Text(TextInput)의 Props중 allowFontScaling의 default값을 false로 설정한다 (기존 default는 true값)
Text.defaultProps = Text.defaultProps || {};
Text.defaultProps.allowFontScaling = false;
타입스크립트라면
interface TextWithDefaultProps extends Text {
defaultProps?: {allowFontScaling?: boolean};
}
interface TextInputWithDefaultProps extends TextInput {
defaultProps?: {allowFontScaling?: boolean};
}
(Text as unknown as TextWithDefaultProps).defaultProps = (Text as unknown as TextWithDefaultProps).defaultProps || {};
(Text as unknown as TextWithDefaultProps).defaultProps!.allowFontScaling = false;
(TextInput as unknown as TextInputWithDefaultProps).defaultProps = (TextInput as unknown as TextInputWithDefaultProps).defaultProps || {};
(TextInput as unknown as TextInputWithDefaultProps).defaultProps!.allowFontScaling = false;