-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Error on re-render #484
Comments
You have this error when you don't wrap material-ui components in MuiThemeProvider. So it's not a storybook issue. |
Thanks @usulpro |
@usulpro thanks for the addon. Looks great. Just to know what I am doing wrong -so I can learn from it-, I got this error even when providing a theme using
The first time it renders fine, however on a change I get the error message above. |
In general this code works well for me. |
I have this same problem. When |
Same problem here, testing my components wrapping material-ui own components, with Storybook and Specifications add-on. Used addDecorator in my config.js file :
When I do a hard reload, everything works fine, but everytime there is a hot-reload, I get a "Cannot read property 'prepareStyles' of undefined". EDIT : Found solution in another ticket : #463 |
Note that my test case repository does not include |
I notice that when 'storybook-addon-apollo-client' is active, my component do two renders, and if I activate 'storybook-react-i18next' my component do 4 unnecessary renders. That is a problem, because I'm using MockedProvider and when a component do more renders than I'm expecting, my query is executed more than once, so I need to duplicate fake query mocks for each render. on refresh the whole page, I don't have this issue. but when I do a change in the code, 4 to 6 unnecessary renders appears. component
story
|
The first time it loads its fine, however when I make a change and it tries to re-render shows this error message:
Here is the code of the component:
I am also using a decorator to provide the props to the Material-UI components.
The text was updated successfully, but these errors were encountered: