nathanbuchar / react-hook-thunk-reducer

📡 A React useReducer() hook whose dispatcher supports thunks à la redux-thunk.
MIT License
108 stars 14 forks source link

Support Promises #17

Open Justinohallo opened 4 years ago

Justinohallo commented 4 years ago

The Redux Dispatch will return a promise, allowing you to chain actions after the dispatch has taken place.

While the native useReducer dispatch does not return a promise, would it make sense for this Thunk implementation to do so?

nathanbuchar commented 4 years ago

Wouldn't be a bad idea, I guess I haven't used Redux in a while so thunks returning promises is new to me. I'll be honest though this isn't high on my list, but I'd welcome a PR :)