I’m trying to use React Native’s Stylesheet.create method in class component and I’m getting an error. This does work in functional components but not in class components. How can I resolve this issue?
Question posted in React native
The official React Native documentation can be found here.
The official React Native documentation can be found here.
2
Answers
Declare the StyleSheet outside of the component.