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
[Web] setImmediate
SSR regression in 2.3.0-beta.3
#2621
Labels
Comments
Issue validatorThe issue is valid! |
nandorojo
added a commit
to nandorojo/react-native-reanimated
that referenced
this issue
Nov 10, 2021
Use `requestAnimationFrame` on Web, instead of `setImmediate`. See software-mansion#2621 and software-mansion#1521 for reference.
Opened a PR to solve this at #2622 |
Thanks to report and PR 😍 I will test it before release and I will merge it if everything will be ok. |
piaskowyk
pushed a commit
that referenced
this issue
Nov 23, 2021
Use `requestAnimationFrame` on Web, instead of `setImmediate`. See #2621 and #1521 for reference. ## Description Fix #2621 <!-- Description and motivation for this PR. Inlude Fixes #<number> if this is fixing some issue. Fixes # . --> ## Changes `setImmediate` breaks SSR on Web. `requestAnimationFrame` is better. This was already discussed and merged previously at #1521. <!-- Please describe things you've changed here, make a **high level** overview, if change is simple you can omit this section. For example: - Added `foo` method which add bouncing animation - Updated `about.md` docs - Added caching in CI builds --> <!-- ## Screenshots / GIFs N/A. ### Before Next.js wouldn't compile. ### After It now does compile. --> ## Test code and steps to reproduce <!-- Please include code that can be used to test this change and short description how this example should work. This snippet should be as minimal as possible and ready to be pasted into editor (don't exclude exports or remove "not important" parts of reproduction example) --> ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Added TS types tests - [ ] Added unit / integration tests - [ ] Updated documentation - [ ] Ensured that CI passes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
If you run 2.3.0-beta.3 with Next.js, you get this error:
Expected behavior
setImmediate
should not be used on Web. Instead, it should userequestAnimationFrame
. This is a regression from previous versions, where this replacement was already made.It was originally fixed here: #1891
Actual behavior & steps to reproduce
Create an SSR app, use reanimated 2.3.0-beta.3.
Snack or minimal code example
I can create one if necessary, but this bug has historically been an issue with Reanimated.
Package versions
Affected platforms
Patch
This patch fixes it:
The text was updated successfully, but these errors were encountered: