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
I'm using setImmediate with expo, react-native, and next.js for the web client.
When I build my project for the web, any page using react-native-reanimated works fine on Chrome (after I added a polyfill), works on the first load on Safari, but not on subsequent page reloads. I get Can't find variable: setImmediate error. Only happens when I run a production build. Next.js disabled setImmediate back in Feb. vercel/next.js#10612
Curious if there could be another alternative instead of setImmediate that could be used here.
The mozilla website says this regarding the use of setImmediate: https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Screenshots
Steps To Reproduce
Create an expo/next.js project
install react-native-reanimated
Build a production build
Run in Safari/Chrome and observe.
Expected behavior
It shouldn't trigger setImmediate is not defined error.
Actual behavior
It triggers setImmediate is not defined
Snack or minimal code example
Can provide this tomorrow.
Package versions
React: ~16.9.0
React Native: ~0.61.5
React Native Reanimated: ^1.9.0
Expo: ^37.0.8
Next: ^9.4.4
The text was updated successfully, but these errors were encountered:
Actually, ignore this. I found a way to inject the polyfill right before I make my call to react-native-reanimated, lower down the chain instead of pages/_app.tsx and it fixes the issue.
Actually, ignore this. I found a way to inject the polyfill right before I make my call to react-native-reanimated, lower down the chain instead of pages/_app.tsx and it fixes the issue.
Description
I'm using
setImmediate
withexpo
,react-native
, andnext.js
for the web client.When I build my project for the web, any page using
react-native-reanimated
works fine on Chrome (after I added a polyfill), works on the first load on Safari, but not on subsequent page reloads. I getCan't find variable: setImmediate
error. Only happens when I run a production build.Next.js
disabledsetImmediate
back in Feb. vercel/next.js#10612Curious if there could be another alternative instead of
setImmediate
that could be used here.The mozilla website says this regarding the use of
setImmediate
:https://developer.mozilla.org/en-US/docs/Web/API/Window/setImmediate
Screenshots
Steps To Reproduce
react-native-reanimated
Expected behavior
It shouldn't trigger
setImmediate is not defined
error.Actual behavior
It triggers
setImmediate is not defined
Snack or minimal code example
Can provide this tomorrow.
Package versions
The text was updated successfully, but these errors were encountered: