techmatters / terraso-mobile-client

GNU Affero General Public License v3.0
2 stars 0 forks source link

Reanimated generates reduceMotion console warning #1548

Closed paulschreiber closed 1 day ago

paulschreiber commented 2 weeks ago

This console warning is generated

 WARN  [Reanimated] Tried to modify key `reduceMotion` of an object which has been already passed to a worklet. See 
https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#tried-to-modify-key-of-an-object-which-has-been-converted-to-a-shareable 
for more details.
paulschreiber commented 2 weeks ago

This is a bug in the bottom sheet library: https://github.com/gorhom/react-native-bottom-sheet/issues/1854 https://github.com/gorhom/react-native-bottom-sheet/pull/1848

Quyet114 commented 2 days ago

import { LogBox } from 'react-native'; function App(): React.JSX.Element { LogBox.ignoreLogs([ '[Reanimated] Tried to modify key reduceMotion of an object which has been already passed to a worklet.', ]); return ( ) } use in App.tsx

paulschreiber commented 1 day ago

@Quyet114 that does not work. You can use d a regex like thos:

LogBox.ignoreLogs([
  /^[Reanimated] Tried to modify key `reduceMotion` of an object which has been already passed to a worklet/,
]);