Skip to content

How to auto-update 3rd party views?

How to auto-update 3rd party views?
  1. If you’re using react-native, react-native-reanimated, or react-native-gesture-handler components with style prop, avoid doing anything. It will work out of the box.

  2. For react-native components with contentContainerStyle prop, you can use the withUnistyles factory. It will auto map this property for you.

  3. If you’re using third-party components and you’re confident they internally use react-native components, check the Babel plugin configuration to see if they can be processed to work out of the box.

  4. If that fails, try migrating to the withUnistyles factory. It follows best practices and ensures that only a single component is re-rendered when dependencies change. It’s also recommended to map react-native properties like color or trackColor.

  5. If that also fails, follow best practices and use the useUnistyles hook.