-
-
Notifications
You must be signed in to change notification settings - Fork 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
Component don't rerender if prop changes in short period of time #4216
Comments
beautyfree
changed the title
Component don't rerender if props changes in short period of time
Component don't rerender if prop changes in short period of time
Nov 22, 2023
State updates are batched, so you can't count on multiple updates in a very close succession rendering on the "intermediate" state, even if you update them on different ticks of the event loop. This is true in both react and preact, although the IRL effect may vary. |
Try deleting Drawer.Content. I then get the same result. Pretty sure it's just a race condition with the re-rendering engine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I don't know the reason, but looks like component don't rerender if prop changes in short period of time.
Just look on sandbox with react and preact below
To Reproduce
codesandbox.io/p/sandbox/young-architecture-6t4dzs
Expected behavior
Drawer opens like with react https://codesandbox.io/p/devbox/drawer-with-scale-forked-9pd3cx?file=%2Fapp%2Fmy-drawer.tsx%3A14%2C1
The text was updated successfully, but these errors were encountered: