Y
Hacker News
new
|
ask
|
show
|
jobs
by
atis
2693 days ago
Pass the things returned from useReducer() hook (state object + dispatch function) down via context. Then useContext() in child components.
1 comments
mustafa-alfar
2689 days ago
How can you implement that, the useReducer must be inside the hooks component, so how can I export the value returned from useReducer to pass it into createContext ?
link