ribesg
02/29/2020, 10:09 AMdispatch
function? useContext
only returns the stateribesg
02/29/2020, 10:11 AMuseReducer
in all components that need to be able to update the context's state?ribesg
02/29/2020, 10:12 AMNikky
03/01/2020, 10:36 AMuseState { exampleToggle = true }
that is without redux or suchribesg
03/01/2020, 12:35 PMuseState
is local to a component, a context can be retrieved from anywhere in the hierarchy (basically replaces Redux)ribesg
03/01/2020, 12:36 PM