Error: Stateprovider(...): Nothing Was Returned From Render. This Usually Means A Return Statement Is Missing. Or, To Render Nothing, Return Null
I have this error as Error: StateProvider(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null. And it is co
Solution 1:
You are missing the return statement here:
export const StateProvider = ({ reducer, initialState, children}) => {
return (<StateContext.Provider value={useReducer(reducer, initialState)}>
{children}
</StateContext.Provider>)
};
Post a Comment for "Error: Stateprovider(...): Nothing Was Returned From Render. This Usually Means A Return Statement Is Missing. Or, To Render Nothing, Return Null"