How can i reproduce flex-direction: row-reverse
in React-Native? When in element' style i'm doing:
flexDirection: 'row-reverse'
i'm getting error:
Invalid prop
flexDirection
of valuerow-reverse
supplied toStyleSheet
UPDATE: They just added it in version 0.29.0 :)
Flex DirectionBy default, React Native lays out with LTR layout direction. In this mode start refers to left and end refers to right. LTR (default value) Text and children are laid out from left to right. Margin and padding applied to the start of an element are applied on the left side.
The flex container's main-axis is defined to be the same as the text direction. The main-start and main-end points are the same as the content direction. row-reverse. Behaves the same as row but the main-start and main-end points are opposite to the content direction. column.
Use align-items utilities on flexbox containers to change the alignment of flex items on the cross axis (the y-axis to start, x-axis if flex-direction: column ). Choose from start , end , center , baseline , or stretch (browser default).
Reverse the display of the itemsrow-reverse. column-reverse.
UPDATE
As of v29, React Native provides support for reverse flex directions in Android and iOS. https://github.com/facebook/react-native/releases/tag/v0.29.0
ORIGINAL ANSWER
There is no row-reverse
or column-reverse
in react-native.
See this table of supported attributes:
https://github.com/facebook/css-layout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With