NativeKeel ยท React Native fixes

Text.defaultProps has no effect after upgrading to React Native 0.78 (React 19)

Updated 2026-10-10

There is no error message. After moving to React Native 0.78 or later, settings like these silently stop applying:

Text.defaultProps = Text.defaultProps || {};
Text.defaultProps.allowFontScaling = false;
TextInput.defaultProps = { ...TextInput.defaultProps, style: { fontFamily: 'Inter' } };

The app-wide font or color disappears, or text that was capped now follows the system text size and fixed layouts overflow.

Why. React Native 0.78 ships React 19, and React 19 applies defaultProps only to class components. Text and TextInput are function components. React Native and Expo compile JSX with the automatic runtime, whose jsx() never reads defaultProps, and the React Native renderer merges defaults only for classes (resolveClassComponentProps). Checked in React 19.1 and React Native 0.82.

The one exception: components rendered through React.createElement still get them. NativeWind renders that way, so in NativeWind projects the defaults may still apply to styled elements.

Fix. Move the defaults into your own components and use them everywhere:

import { Text as RNText, type TextProps } from 'react-native';

export function Text({ maxFontSizeMultiplier = 1.5, style, ...props }: TextProps) {
  return <RNText maxFontSizeMultiplier={maxFontSizeMultiplier} style={[{ fontFamily: 'Inter' }, style]} {...props} />;
}

Do the same for TextInput, then check the main screens at the largest system text size. Prefer a cap such as maxFontSizeMultiplier over allowFontScaling={false}: turning scaling off locks out people who need larger text.

Find it in your app. npx nativekeel reports Text.defaultProps and TextInput.defaultProps assignments: on 0.78+ that they have no effect, before 0.78 that they will stop working when you upgrade.

Check your whole app in one command: npx nativekeel
Free, runs locally (your code is not uploaded), no account. It reports this and 80 other upgrade, store, crash and security problems.

Sources