Closed xseignard closed 6 months ago
Hey @xseignard , did you get any response from @software-mansion on alternative ways to solve this?
While this PR does not change the code anymore it still adds a lot of dependencies and complexity at build time which will require maintenance. It just doesn't seem right that every library would need to add something like this just to be called.
I agree it is kind of over-engineered 😅 I'll try to get some attention on the subject to see if there's a better way.
Hey @xseignard , I wonder how I should continue with this. If I understood the discussion correctly https://github.com/software-mansion/react-native-reanimated/pull/5669 should resolve this issue. Should we just wait for that to land?
Hello 👋 Yes at one point it will solve the current issue.
So I think this PR can be closed.
Thanks for the follow up! 🙏
Why
Supersede #67
react-native-reanimated
is a popular library forreact-native
to create and drive animations.See https://docs.swmansion.com/react-native-reanimated/
react-native
is running on 2 threads:react-native
code executionTo be able to run
simplex-noise
on the UI thread withreact-native-reanimated
we need to workletize the functions.You can read more here: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#worklet
How
"worklet";
directives where neededreact-native
andexports
fields to distribute specific versions ofsimplex-noise
Test
Tested on mobile with
react-native@0.72.6
andreact-native-reanimated@3.6.2
Impacts
"worklet";
directives are added dynamically at build timeGood to know
Will only work with
react-native-reanimated@3.6.2+