smooth-ui icon indicating copy to clipboard operation
smooth-ui copied to clipboard

TypeError: Invalid value used as weak map key

Open marcelofabianov opened this issue 5 years ago • 4 comments

💬 TypeError: Invalid value used as weak map key

using create-react-app and yarn add @smooth-ui/core-sc reakit styled-components

marcelofabianov avatar Feb 26 '20 19:02 marcelofabianov

i have same issues

rogeliozx avatar Feb 27 '20 00:02 rogeliozx

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>

ividic avatar Mar 03 '20 04:03 ividic

The workaround is actually to use a theme, but yes it is a bug.

gregberge avatar Mar 07 '20 13:03 gregberge

Theme should not be mandatory to use this library.

gregberge avatar Mar 07 '20 13:03 gregberge