I'd like to use the useContext
and createContext
with an arrow function. I want to be able to use variables inside Foo
and pass them in createContext
.
export const Foo = () => {...}
Combine above and below.
export const Bar = React.createContext({ lang: 'en'})