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
When you have multiple Suspense siblings with internal components calling useTransition, starting one transition shifts the pending signal to true inside all Suspense boundaries. Is this expected?
Yes this is the current behavior. There is only one Transition and the pending state taps into that. I've wondered if this made sense. Like in React there is one Transition too but they only propagate it through the specific call that started it. Now we could do that too by creating a signal per, but the opposite problem can occur. I've come to think that separate is probably be better but I didn't know that 3 years ago when we first released the feature.
This is a breaking change though. So going to mark this as a 2.0 issue.
There is only one Transition and the pending state taps into that.
Oh I did not know about this. Thanks for the explanation.
Now that with that info, I realised that if I click buttons in quick succession, UI does not change for any lines until the final start call resolves. I guess this is also due to having a single global transition, batching things together? (React seems to do the same thing with use(promise) and useTransition)
Describe the bug
When you have multiple
Suspense
siblings with internal components callinguseTransition
, starting one transition shifts the pending signal to true inside allSuspense
boundaries. Is this expected?Your Example Website or App
https://playground.solidjs.com/anonymous/dac2d20e-5f9e-4bbc-be95-73ff967c88d2
Steps to Reproduce the Bug or Issue
Load https://playground.solidjs.com/anonymous/dac2d20e-5f9e-4bbc-be95-73ff967c88d2
Hit Start on one of the lines
All lines show Pending state
Expected behavior
Only the clicked line should show a pending state as it should be isolated in the Suspense boundary.
Screenshots or Videos
No response
Platform
Solid 1.8.15
Additional context
Let me know if I'm misunderstanding the functionality.
The text was updated successfully, but these errors were encountered: