-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Reset isForkingSandbox on error #1859
Reset isForkingSandbox on error #1859
Conversation
Close codesandbox#1803. I'm not sure what's the best way to reset some state on error with Cerebral though. Basically, I'd like to be able to always reset this state at the end of the `forkSandbox` sequence (https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/app/store/sequences.js#L162) instead of doing this in every single action called by this sequence.
This is a good approach! I think a bit cleaner approach would be to use paths, like we do here: https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/app/store/sequences.js#L492-L496. In that example in the action we import |
Hey @CompuIves, I've updated to paths. Let me know if this matches what you had in mind 🙂 |
Looks good! Thank you! |
Close #1803.
I'm not sure what's the best way to reset some state on error with Cerebral though.
Basically, I'd like to be able to always reset this state at the end of the
forkSandbox
sequence (https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/app/store/sequences.js#L162) instead of doing this in every single action called by this sequence.