Open r002 opened 3 years ago
If you create a context that consists of an array with two elements:
https://github.com/btholt/citr-v6-project/blob/1d8645b0b72794e77e9fd0116dc0234066b31e88/11-context/src/ThemeContext.js#L3
but then try to set the context with a default value of a single string:
https://github.com/btholt/citr-v6-project/blob/1d8645b0b72794e77e9fd0116dc0234066b31e88/11-context/src/App.js#L9-L11
it fails. At least I'm not currently able to get this specific code to work. If I'm missing something, please lmk.
If you create a context that consists of an array with two elements:
https://github.com/btholt/citr-v6-project/blob/1d8645b0b72794e77e9fd0116dc0234066b31e88/11-context/src/ThemeContext.js#L3
but then try to set the context with a default value of a single string:
https://github.com/btholt/citr-v6-project/blob/1d8645b0b72794e77e9fd0116dc0234066b31e88/11-context/src/App.js#L9-L11
it fails. At least I'm not currently able to get this specific code to work. If I'm missing something, please lmk.