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
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
The text was updated successfully, but these errors were encountered:
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.
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: