Detect raw text outside of Text component
October 24, 2018 ยท View on GitHub
All strings in React Native should be wrapped with a Text component.
Rule Details
The following patterns are considered warnings:
<View>some text</View>
const text = 'some text';
<View>{`${text}`}</View>
The following patterns are not considered warnings:
<View><Text>some text</Text></View>
const text = 'some text';
<View><Text>{`${text}`}</Text></View>
This rule has an object option:
- "skip" โ allow to skip checking for the array of custom components