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
A related issue occurs when using storyshots. The previous story component does not unmount between stories. I was able to fix this by modifying test-bodies.js to unmount. I can submit a PR if this is an appropriate solution.
import {dispatch} from 'store';
import {reset} from 'ducks';
import SomeComponent from 'containers/SomeComponent'
storiesOf('story', module)
.addDecorator(story => {
dispatch(reset());
return story();
})
.add('pending removal', () => {
dispatch(...); // if data set here is required by SomeComponent, we have problems
return <SomeComponent />;
The text was updated successfully, but these errors were encountered:
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. We do try to do some housekeeping every once in a while so inactive issues will get closed after 90 days. Thanks!
In my decorator, I reset global state to empty with redux.
In each story, I dispatch actions which set the required global data for the component to be rendered.
When I use my browser's refresh while on such a story or go directly to its URL, I get an error page because it:
I believe the correct thing to do would be to either (a) not run the story twice or (b) unmount first before running again.
Two different hacks got this working for me.
A related issue occurs when using storyshots. The previous story component does not unmount between stories. I was able to fix this by modifying
test-bodies.js
to unmount. I can submit a PR if this is an appropriate solution.For reference, this is how my stories look:
The text was updated successfully, but these errors were encountered: