Content
@
0 reply
0 recast
0 reaction
degeneratecall.eth š”
@degeneratecall.eth
1) @frames, CC @stephancill @df I'm diving a bit deeper into some more (complex?) conditional logic. My issue is that, given the scenario below, I'm unable to determine in the reducer when loading pg3 which btn is clicked on pg2, ie `doB` or `doC`, because all I have available is the idx, which is `1` for both/either?
3 replies
0 recast
2 reactions
David Furlong
@df
yeah thats what the state should solve; you should store whatever additional context you need in the reducer state
2 replies
0 recast
0 reaction
David Furlong
@df
for example store `condition` in the state, then you can use that to determine what branch you're on
1 reply
0 recast
0 reaction
degeneratecall.eth š”
@degeneratecall.eth
Okay, thanks @df @stephancill it looks like directly manipulating the state object as it's passed into the <FrameContainer /> does the trick. I avoided pushing ahead with this pattern thinking all state modification should be restricted to the reducer redux-style. Thanks for the responsiveness!
0 reply
0 recast
1 reaction