Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
So, I followed the README, exporting from theming.js:
Thanks god I can use useTheme it in my index.js! But... what's the theme property of the ThemeProvider? How can I add multiple themes, and maybe switch themes?
To me, documentation is completely unclear and the example isn't updated. Following the example, you end up with a not working app (Nextjs
_app.js
):So, I followed the README, exporting from
theming.js
:Thanks god I can use
useTheme
it in myindex.js
! But... what's the theme property of theThemeProvider
? How can I add multiple themes, and maybe switch themes?