Commit 96f7303
committed
Fix occasional flicker when transitioning a property
If transitionStyleHasChangedResult is true, the code in useLayoutEffect
should run synchronously without rendering the style being transitioned
to, but this doesn't appear to be the case 100% of the time because
I've got one transition that momentarily shows the target style before
running the transition. Even this doesn't repro reliably.
Even though I'd expect returning the current style if
transitionStyleHasChangedResult is true to be a no-op (because the
useLayoutEffect should cause a synchronous render with a new value), it
doesn't seem to always be that way and this PR fixes the issue1 parent 2cd7c79 commit 96f7303
1 file changed
Lines changed: 4 additions & 0 deletions
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
403 | 407 | | |
404 | 408 | | |
405 | 409 | | |
| |||
0 commit comments