In my application, I'm trying to use React Context's with setState.
const userContext = React.createContext([{ user: {} }, () => {}]);
const userHook = useState({ user: {} });
<userContext.Provider value={userHook}>
// some other code here
</userContext.Provider>
However, I'm getting this error in my linter:
.
Could anyone point me in the right direction?
Also, when I try to use React.createContext() like in many tutorials, e.g.:
const ThemeContext = createContext(["green", () => {}]);
I get another linter error about an unexpected empty arrow function. How do I fix that?