-
current loki does not work with storybook 9 , i got the patch from #541 on my But loki without patch ( oblador's loki) was not throwing this error. This behaviour seems to be in the storybook 9 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The issue was not caused by Loki or the patch itself — it turned out to be related to how I structured the Storybook story when rendering multiple components that use React hooks internally. Initially, I had the following story setup:
This caused the error:
Solution When I changed the logic to generate the component list before the return statement, and then used a variable to return them, the error was resolved:
|
Beta Was this translation helpful? Give feedback.
The issue was not caused by Loki or the patch itself — it turned out to be related to how I structured the Storybook story when rendering multiple components that use React hooks internally.
Initially, I had the following story setup:
This caused the error:
Error: Rendered more hooks than during the previous render.
Solution
When I changed the logic to generate the component list before the return statement, and then used a variable to return them, the error was resolved: