react-live-clock: Invariant Violation: Text strings must be rendered within a component.
This is my render function:
render() {
return (
<View style={styles.container}>
<Text style={styles.text}>Hello World!
<Clock format={'HH:mm:ss'} ticking={true} timezone={'US/Pacific'} />
</Text>
</View>
);
}
There is an error coming up:
Invariant Violation: Text strings must be rendered within a <Text> component.
Moving <Clock> outside <Text> and even <View> doesn’t fix the problem.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 26
Commits related to this issue
- Update README.md Updates documentation to help future occurances of missing text wrapping (#21 #276 ) in react native. — committed to pvoznyuk/react-live-clock by anthony0030 a year ago
No problem at all Anthony, thanks so much for your efforts. I just tried it and can confirm the error has disappeared. All the best!