Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
atis
· 7y ago · 0 comments
Pass the things returned from useReducer() hook (state object + dispatch function) down via context. Then useContext() in child components.
Comments
[–]
mustafa-alfar
7y 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 ?