Yashotantra Academy
AI · Blockchain · Cloud · Data
Dark mode active
Learn
Tracks
ABCD
Certification
More
▾
Dark mode active
Learn
Tracks
ABCD
Certification
Study
Theory
Code Lab
Build
Solidity IDE
Staking Sandbox
Simulation
Reference
Wallets
Gas Fees
Explorers
← Code Lab
React Native
0/50 solved · 0%
All lessons
lesson
code
Layout · easy
2. Flex row totals
Sum flex values to check a row layout.
Write `totalFlex(children)` where each child is `{ flex: number }`, returning the sum of all `flex` values.
Required in your answer:
.reduce(
Reveal solution
Run & check
Reset
Transpiled, then run in a sandbox
function totalFlex(children) { // TODO }
Output appears here.
← 1. Merging styles
3. Platform.select logic →