-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Bug: reenter in sibling states #4818
Comments
Reentry does not apply here since you are not reentering the same (or ancestor) state. |
But how could I achieve this functionality? Just to be clear, i have no parente-child state, only sibiling states. And I want transition many times to the same state during the execution in a way that every time the state execute it's entry function |
But how could I achieve this functionality? Just to be clear, i have no parente-child state, only sibiling states. And I want transition many times to the same state during the execution in a way that every time the state execute it's entry function |
Closing this as invalid – if you can explain your use-case a bit more, I can help you figure out a better solution. However, reentering is not related to sibling states. |
XState version
XState version 5
Description
Reenter attribute doesn't work on sibiling states
Expected result
[...]
states:{
state1:{
entry: console.log(''state1")
on:{
'':{target: 'state2'
reenter: true},
},
},
state2:{
entry: console.log(''state2")
on:{
'':{target: 'state1'
reenter: true},
},
},
}
[...]
output: state1
state2
state1
state2
state1
state2
[...]
Actual result
output: state1
state2
and stops here, doesn't reenter in states that are not parent-child
Reproduction
i dont really know how to make those options of reproduction
Additional context
No response
The text was updated successfully, but these errors were encountered: