FormidableLabs / victory-native-xl

A charting library for React Native with a focus on performance and customization.
https://commerce.nearform.com/open-source/victory-native
719 stars 53 forks source link

Address reanimated API misuse warnings that pop up starting with reanimated 3.16.0 #411

Open vhakulinen opened 1 week ago

vhakulinen commented 1 week ago

Describe Your Environment

What version of victory-native-xl are you using? 41.8.0

What version of React and React Native are you using? 0.73

What version of Reanimated and React Native Skia are you using? reanimated 3.16.1, skia 1.5.0

Are you using Expo or React Native CLI? cli

What platform are you on? Android

Describe the Problem

Getting following errors when using CartesianChart:

 WARN  [Reanimated] Writing to `value` during component render. Please ensure that you do not access the `value` property or use `set` method of a shared value while React is rendering a component.

If you don't want to see this message, you can disable the `strict` mode. Refer to:
https://docs.swmansion.com/react-native-reanimated/docs/debugging/logger-configuration for more details.

Expected behavior:

Shared values not accessed during component render.

Actual behavior:

Shared values are accessed during component render.

Additional Information

Reanimated version 3.16.0 introduced a logger that by default shows warnings about API misuse.

Related issue in react-native-bottom-sheet: https://github.com/gorhom/react-native-bottom-sheet/issues/1983

The warning image

ajhoel43 commented 5 days ago

Same here, then I revert my reanimated lib into version 3.15.0 and remove some modification in metro.config.js related to reanimated lib and the warning is not there anymore.

I know it is not the solution, but just FYI.