What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-03 03:08:15
'{ state: any; dispatch: React.Dispatch<{ type: string; payload: any; }>; }' is not assignable to type 'Store'
const [state, dispatch] = React.useReducer(reducer, initialState); const value = { state, dispatch }; return <Store.Provider value={value as MyContextType}>{props.children}</Store.Provider>; Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5