I 'm facing that error when I try to run the project on iOS and android:
ERROR ReanimatedError: [Reanimated] Tried to synchronously call a non-worklet functionbound dispatchSetStateon the UI thread.
Even I tried to the same on a new project but without success, The Canvas works perfectly on WEB, but I doesnt work neither iOS neither android.
And this error happens when I pressed the canvas in order to try to draw..
Also I followed the instructions that React-Native-Reanimated says about a similar error, before start:
They say:
**_In short, the Reanimated babel plugin automatically converts special JavaScript functions (called worklets) to allow them to be passed and run on the UI thread.
So then when I ran in it "npx expo run:ios", Throws me an error that I needed to put the library that I put on Babel Plugins as a devDependency on package.json.
That error dissapeared, but again its showing me the main errror:
ERROR ReanimatedError: [Reanimated] Tried to synchronously call a non-worklet functionaddPointToPathon the UI thread.
Expected Behavior
I expected that the Canvas works well on all platforms: Web, iOS and android
Steps To Reproduce
I installed SVG and gesture handler for expo, even in another project the npm version of that libraries.
Then I do: npx expo prebuild, in order to make the ios and android folders
On what kind of device are you using this library?
Environment
Current Behavior
I 'm facing that error when I try to run the project on iOS and android:
ERROR ReanimatedError: [Reanimated] Tried to synchronously call a non-worklet function
bound dispatchSetStateon the UI thread.
Even I tried to the same on a new project but without success, The Canvas works perfectly on WEB, but I doesnt work neither iOS neither android. And this error happens when I pressed the canvas in order to try to draw..
Thats my code just as I have as this moment:
Also I followed the instructions that React-Native-Reanimated says about a similar error, before start: They say:
**_In short, the Reanimated babel plugin automatically converts special JavaScript functions (called worklets) to allow them to be passed and run on the UI thread.
To learn more about the plugin head onto to Reanimated babel plugin section._**
So, I decided to edit babel.config.js as this:
So then when I ran in it "npx expo run:ios", Throws me an error that I needed to put the library that I put on Babel Plugins as a devDependency on package.json.
So I added as this:
That error dissapeared, but again its showing me the main errror:
ERROR ReanimatedError: [Reanimated] Tried to synchronously call a non-worklet function
addPointToPathon the UI thread.
Expected Behavior
I expected that the Canvas works well on all platforms: Web, iOS and android
Steps To Reproduce
npx expo prebuild
, in order to make the ios and android folderscd ios && pod install && cd ..
npx expo run:ios
Anything else?
No response