score:3

You don't need to use useMemo. It will duplicate what Provider already accomplishes. Instead

return <AuthDataContext.Provider value={{ authData, onLogin, onLogout }} {...props} />;

score:64

The "nextCreate is not a function" error is thrown when you're not passing a function as a useMemo() argument. For example, useMemo(123, []) will throw and useMemo(() => 123, []) won't.


Related Query

More Query from same tag