Skip to content

Commit a402231

Browse files
author
Nir Hadassi
committed
updated post
1 parent 7fac8b0 commit a402231

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,22 @@ const FlexExample = () =>
146146
</View>;
147147
```
148148

149+
And the result:
149150
<div>
150151
<img src="images/iphoneflex.png" height="450" hspace="20"/>
151152
<img src="images/tabletflex.png" height="450" hspace="20"/>
152153
</div>
153-
<br/>
154+
<br/>
155+
156+
Although the box has a good size on the tablet I personally don't recommend flexing you components.
157+
Flex can be an amazing solution for a lot of stuff but not for scaling, because..
158+
159+
* Results in a messy code with a lot of empty Views.
160+
* You can only flex width, height, margin and padding. Stuff like font-size or shadow-radius can't be flexed.
161+
* Calculating everything with flex takes time, and as we know, time is money.
162+
163+
That said, we can now continue to our second method.
164+
165+
<h3>Method 2: Viewport Units</h3>
166+
167+

images/tablet1.png

-2.2 KB
Loading

0 commit comments

Comments
 (0)