Sunday, June 28, 2020

React Native - Flex

                                   Flex
             The Flex is style attribute gives us the ability to define layouts that can expand and shrink automatically based on screen size. The flex value is a number that represents the ratio of space that a component should take up, relative to its siblings.
       If  flex value is 1, the component will expand to fill its parent entirely. if flex value of 0, the component will shrink to the minimum space possible.
The flexDirection adds the style to the component in a primary axis of its layout.It has a property row & column to organize children vertically and horizontally. The default flexDirection is column.

Example:
Output:


Previous Post
Next Post

post written by:

Hello guys, myself Pooja Tirmare. I want to share my knowledge with people so they can learn react native and make beautiful applications.