Skip to content

Side effect failing #26

Closed Answered by GregoryConrad
busslina asked this question in Q&A
Dec 22, 2023 · 2 comments · 11 replies
Discussion options

You must be logged in to vote

Issue in original post is that you are doing use.foobar conditionally. Since use.register only executes on the first build, you’ll only register those two use.state on the first build, which is incorrect

solution would be to hoist the use.states up before the use.register. You’ll still be able to access them within the register!

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
7 replies
@busslina
Comment options

@GregoryConrad
Comment options

@busslina
Comment options

@GregoryConrad
Comment options

@GregoryConrad
Comment options

Comment options

You must be logged in to vote
4 replies
@busslina
Comment options

@busslina
Comment options

@GregoryConrad
Comment options

@busslina
Comment options

Answer selected by GregoryConrad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants