Problem Statement
What is the main advantage of using StyleSheet.create() in React Native?
Explanation
StyleSheet.create() helps improve performance by freezing style definitions and preventing new object creation on each render.
It also validates property names, catching typos early during development.
Code Solution
SolutionRead Only
const styles = StyleSheet.create({
container: { flex: 1, padding: 20 }
});