Closed martdavidson closed 1 year ago
Ah, I see this issue. This seems to be an error with how styled-jsx
works with storybook. This might be something to solve on either styled-jsx
's or storybook's end.
I would look into this further, but you're better served migrating to storybook's framework api that comes out with v7 on march 14. I'm directing everyone using this addon to migrate over.
Describe the bug
Before installing this addon, I was able to enable strict mode in storybook by doing:
in my
main.ts
as documented by this issue https://github.com/storybookjs/storybook/issues/12734 and associated PR.This was working fine, I would see my effects being called twice on mount.
Since adding this package, any combination of
strictMode: true
or puttingreactStrictMode: true
in thenext.config.js
I am using for this addon results in all stories throwing:Is this expected? Do you have an idea right off the bat of what is happening here?
I will fill in a valid reproduction if it's not immediately obvious to you why this might be happening. I believe the one liner in
Steps to reproduce
will cause this if you run one of your examples with it.Steps to reproduce
reactOptions: { strictMode: true }
to your export from.storybook/main.js
.Expected behavior
I expect storybook's strict mode API to "just work".
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Mac OS Next 13.1.1 Storybook 6.5.15 React 18.2.0
storybook-addon-next version
1.7.1
Additional context
No response