-
-
Notifications
You must be signed in to change notification settings - Fork 917
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
Stale read from <Show> under a transition #2046
Comments
Yeah.. I see it.. interestingly only when the browser console is open but that suggests there is a timing issue here. Or more likely the internals of Show that do the check aren't concurrent safe. Thanks for reporting. |
Can similar issues happen even if we don't use the callback form? I use this form a lot: <Show when={condition()}>
<Component prop={condition()!.something} />
</Show> In this case, I assumed that |
You won't get the error because we don't do the checks. The reason we do is because someone could try to access the Signal inside like a timeout where it was no longer defined with a value which would mean TS lied. https://github.com/solidjs/solid/blob/main/packages/solid/src/render/flow.ts#L130C36-L130C45 Hmm.. interestingly it doesn't look like it is what expected. Reproducing this one will probably require me to run it in replay. |
more controllable repro https://playground.solidjs.com/anonymous/e5a35370-6712-46cb-af2b-78d7eca848c0 edit:
the repro meant to show the interaction between the main reactivity system and the transition one in a controllable manner |
Can you please add steps for reproduction? I'm not sure what am I looking at. 😅 |
Describe the bug
I'm encountering
Stale read from <Show>
while a transition is happening. I'm not sure exactly what the problem is, but I created a simple reproduction. I'm not reading the signal in a callback or in async code, which is why it is confusing to me.Your Example Website or App
https://playground.solidjs.com/anonymous/bdbea778-bc1d-4508-963f-6683c38de3d5
Steps to Reproduce the Bug or Issue
Expected behavior
I expect to see the tooltip instead (some text and coordinates). You can see it by holding the mouse still after click.
Workaround
Write the code without using the callback form of
<Show>
The text was updated successfully, but these errors were encountered: