smooth-ui
smooth-ui copied to clipboard
TypeError: Invalid value used as weak map key
💬 TypeError: Invalid value used as weak map key
using create-react-app and yarn add @smooth-ui/core-sc reakit styled-components
i have same issues
You'll need to specify at least one ThemeProvider in somewhere up the component tree, even if it's empty:
<ThemeProvider theme={{}}>
{/* Any Smooth-UI components */}
</ThemeProvider>
If you would like to use the default theme:
import { theme } from '@smooth-ui/core-sc';
// ...
<ThemeProvider theme={theme}>
{/* Any Smooth-UI components */}
</ThemeProvider>
The workaround is actually to use a theme, but yes it is a bug.
Theme should not be mandatory to use this library.