4.1 Remove PropTypes
React 19 removesPropTypes from the React package. All PropTypes usage must be migrated to TypeScript interfaces.
Find all PropTypes usage
4.2 Replace defaultProps
React 19 removesdefaultProps support for function components. Use default parameter values instead.
Find all defaultProps usage
4.3 Replace BackHandler.removeEventListener
BackHandler.removeEventListener() was removed by React Native. Use the subscription pattern.
Find all usage
4.4 Fix useNativeDriver mixed usage
In RN 0.72, mixing native-driver and JS-driver animations was unsupported but only produced warnings. In RN 0.83, this mixing causes a fatal crash (SIGABRT). There are two rules, both enforced:- Per-value: A single
Animated.Valuemust use the same driver across all animations throughout its lifetime. - Per-view (NEW): All
Animated.Valueinstances combined into the same style object on a singleAnimated.Viewmust use the same driver.
- Native driver (
useNativeDriver: true):transform,opacity. Don’t blanket-change alluseNativeDriver: truetofalse. Only fix values where the conflict exists. - JS driver (
useNativeDriver: false):backgroundColor,width,height, color interpolations
4.5 Update legacy Context API usage
React 19 fully removes the legacyContext API (childContextTypes, getChildContext). Use the modern Context API:
4.6 Add explicit React hook imports
If any files use hooks without importing them explicitly, they fail withReferenceError: useState is not defined error.
4.7 Remove incompatible tools
Some development tools are incompatible with React 19:react@^18 as a peer dependency:
4.8 Update SafeAreaView usage
React Native 0.83 requiresreact-native-safe-area-context as a dependency. Update your app’s root component:
4.9 Convert layout values to density-independent pixels (DIP)
React Native 0.83 on Vega uses density-independent pixels (dp) for all layout values. The canvas reference size is 960x540 dp, which is a scale factor of 2 on 1080p displays. The framework automatically scales dp values to physical pixels. Divide all hardcoded pixel values by the scale factor, which is 2 for 1080p devices.4.10 Replace LinearGradient with the backgroundImage style prop
React Native 0.83 supports linear gradients natively through theexperimental_backgroundImage style prop, which accepts standard CSS linear-gradient() syntax on any View. The @amazon-devices/react-linear-gradient library isn’t part of the RN 0.83 library set, and an RN 0.83 app that depends on it can crash at launch.
Remove the @amazon-devices/react-linear-gradient dependency, then replace each <LinearGradient> component with a View that sets experimental_backgroundImage:
start, end, or locations on LinearGradient, express them in the gradient string instead, for example linear-gradient(to right, #e66465 0%, #9198e5 80%). For the full syntax, see experimental_backgroundImage in the React Native documentation.
