coinjar / react-native-wagmi-charts

A sweet & simple chart library for React Native that will make us feel like We're All Gonna Make It.
MIT License
589 stars 116 forks source link

Support reanimated 3.3.0 & Expo 0.49 in example #151

Closed cam-shaw closed 11 months ago

cam-shaw commented 1 year ago

Firstly - thanks @Amurmurmur for their work on the following PR that helped resolve an issue I had with line interpolation in Reanimated 3.x https://github.com/coinjar/react-native-wagmi-charts/pull/149

Is based off of https://github.com/coinjar/react-native-wagmi-charts/pull/148, which has a simple package fix that resolves a crash.

Description Adds support for react-native-reanimated 3.3.0. Updating the x position and index while using snapToPoint was broken in reanimated 3.3.0. This PR also improves performance of the snapToPoint functionality by moving some function calls from out of the scale function (which was being called every x position change). The changes can be seen in this file src/charts/line/Cursor.tsx

I have also updated the readme for snapToPoint prop to add a message about it only being supported in React Native. I observed it not working on web and thought this would be good to call out in the docs.