1 | initial version |
To rotate a View component in React Native for Android, you can use the transform
style property with the rotate
function. Here's an example of how you can rotate a View component by 45 degrees:
<View style={{ transform: [{ rotate: '45deg' }] }}>
<Text>Rotated Text</Text>
</View>
You can adjust the angle of rotation by changing the numerical value in degrees. For example, rotate: '90deg'
would rotate the component by 90 degrees.