hello Sir, whenever I change anything in day2 it goes back to home screen (re-renders) .. even though I change just fonts related setting .. meaning fontSize 5 to 10 .
@@priyamshah7117 @Wavywahid . After 3 hours of debugging. I've debugged the issue. It is because the reanimated and gesture handler callbacks works on the UI thread and the onContinue and onBack function we have created are by default run on the JS thread, so we can not use it directly for some reason (idk why). Here is the solution: import Animated, { FadeIn, FadeOut, runOnJS } from "react-native-reanimated"; //swipeForward .onEnd(() => runOnJS(onHandleContinue)()); //swipeBackward .onEnd(() => runOnJS(exitOnboarding)());
I suffered for two days with a problem after adding reanimated - when I swiped, the application crashed (the buttons worked) Maybe someone will encounter this problem, here is the solution: add: runOnJS(true) const swipe = Gesture.Simultaneous( Gesture.Fling().runOnJS(true).direction(Directions.RIGHT).onStart(onBack), Gesture.Fling().runOnJS(true).direction(Directions.LEFT).onStart(onContinue) )
I suffered for two days with a problem after adding reanimated - when I swiped, the application crashed (the buttons worked) Maybe someone will encounter this problem, here is the solution: add: runOnJS(true) const swipe = Gesture.Simultaneous( Gesture.Fling().runOnJS(true).direction(Directions.RIGHT).onStart(onBack), Gesture.Fling().runOnJS(true).direction(Directions.LEFT).onStart(onContinue) )
Thanks for DEVember!
Amazing tutorial!! Thank you Vadim!!
Appreciate it, thanks! 🙌
Awesome Sir, Done with Day 2. ❤❤
That's great, keep going 🚀
Great content! Thanks, this was very helpful.
Glad it was helpful 🙌
Thanks for the lecture learned too much from it.
You are welcome!
Awesome Video Tutorial!
Thanks!
Thanks man❤
hello Sir, whenever I change anything in day2 it goes back to home screen (re-renders) .. even though I change just fonts related setting .. meaning fontSize 5 to 10 .
nice!
My app crashes when I have Reanimated and try to swipe to left or right. Anybody else have this issue?
same error , how did you solve ? and could you figure out what actually is causing the error ?
@@priyamshah7117 you need to use `runOnJS` when calling an external function in gesture
@@priyamshah7117 @Wavywahid . After 3 hours of debugging. I've debugged the issue.
It is because the reanimated and gesture handler callbacks works on the UI thread and the onContinue and onBack function we have created are by default run on the JS thread, so we can not use it directly for some reason (idk why). Here is the solution:
import Animated, { FadeIn, FadeOut, runOnJS } from "react-native-reanimated";
//swipeForward
.onEnd(() => runOnJS(onHandleContinue)());
//swipeBackward
.onEnd(() => runOnJS(exitOnboarding)());
Had the same, i copied the day2 tsx files from the git repository (day 2 end branch) and all was ok. I couldbt see an obvious difference!
I suffered for two days with a problem after adding reanimated - when I swiped, the application crashed (the buttons worked)
Maybe someone will encounter this problem, here is the solution:
add: runOnJS(true)
const swipe = Gesture.Simultaneous(
Gesture.Fling().runOnJS(true).direction(Directions.RIGHT).onStart(onBack),
Gesture.Fling().runOnJS(true).direction(Directions.LEFT).onStart(onContinue)
)
Sir how to make Onboarding screen only once😢
Well
Guess I better use 3 different pages
I suffered for two days with a problem after adding reanimated - when I swiped, the application crashed (the buttons worked)
Maybe someone will encounter this problem, here is the solution:
add: runOnJS(true)
const swipe = Gesture.Simultaneous(
Gesture.Fling().runOnJS(true).direction(Directions.RIGHT).onStart(onBack),
Gesture.Fling().runOnJS(true).direction(Directions.LEFT).onStart(onContinue)
)
Thanks for sharing!
Thank you for this, solved the issue for me!!