margelo / react-native-graph

📈 Beautiful, high-performance Graphs and Charts for React Native built with Skia
https://margelo.io
MIT License
2.08k stars 118 forks source link

hot swap skia useValue and runSpring hooks with standard reanimated ones #99

Closed daxaxelrod closed 8 months ago

daxaxelrod commented 9 months ago

Need a second pair of eyes here. Got everything to compile but having trouble when testing locally. I git cloned the repo and then used npm link to install it locally in another project as a testing ground (also modified metro, thats project references work just fine).

I keep getting a _measure is undefined error which tells me that the babel worklet plugin is not working. Also when I comment out props.animated in src/LineGraph.tsx to just render the static line component, it throws a couple of react errors which I know shouldnt be happening: Invalid hook call, Hooks can only be called in the body of a function and cannot read property 'useState' of null.

Any ideas? SO and gpt came up dry. How did you test the lib locally @mrousavy

mrousavy commented 9 months ago

Hey, thanks for your PR!

To test it locally just run the example/ app here.

daxaxelrod commented 9 months ago

Thanks, not working quite right yet, will do more testing over the weekend

vovacodes commented 8 months ago

Any luck with fixing the example? Running into this in project too :(

dsshard commented 8 months ago

Hello! Are there any updates on this PR?

gabimoncha commented 8 months ago

@mrousavy this PR is not needed anymore since the migration was done

mrousavy commented 8 months ago

yup 👍

mrousavy commented 8 months ago

released in latest version on npm