Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Lesson 11: Context" Bug? #3

Open
r002 opened this issue Mar 17, 2021 · 0 comments
Open

"Lesson 11: Context" Bug? #3

r002 opened this issue Mar 17, 2021 · 0 comments

Comments

@r002
Copy link

r002 commented Mar 17, 2021

If you create a context that consists of an array with two elements:

const ThemeContext = createContext(["green", () => {}]);

but then try to set the context with a default value of a single string:

const theme = useState("darkblue");
return (
<ThemeContext.Provider value={theme}>

it fails. At least I'm not currently able to get this specific code to work. If I'm missing something, please lmk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant