You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
This was working fine, I would see my effects being called twice on mount.
Since adding this package, any combination of strictMode: true or putting reactStrictMode: true in the next.config.js I am using for this addon results in all stories throwing:
Error
Rendered more hooks than during the previous render.
Call Stack
useHook
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:12364:13
useMemoLike
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:12391:18
useMemo
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:12403:10
withOutline
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:11886:81
undefined
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:12269:21
undefined
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:34690:12
undefined
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:34739:14
renderWithHooks
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:139816:18
mountIndeterminateComponent
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:143580:13
beginWork
vendors-node_modules_babel_runtime_helpers_esm_asyncToGenerator_js-node_modules_babel_runtime-285286.iframe.bundle.js:145093:16
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
Add reactOptions: { strictMode: true } to your export from .storybook/main.js.
Serve your storybook.
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
The text was updated successfully, but these errors were encountered:
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 storybookjs/storybook#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
The text was updated successfully, but these errors were encountered: