SlideShare a Scribd company logo
Kobkrit Viriyayudhakorn, Ph.D.
CEO of iApp Technology Limited.
kobkrit@gmail.com
All source code
• https://github.com/kobkrit/react-native-class-2017
Download Exercise
• https://github.com/kobkrit/react-native-class-2017/
raw/master/exercise/L4.zip
Prepare ENV for making Android App by

React-Native on Windows
• See https://kobkrit.com/react-native-tutorial-react-
native-setup-on-windows-for-android-development-
walkthrough-a463e825159d#.joucl9xkg
Prepare ENV for making Android App by

React-Native on Mac
• https://kobkrit.com/react-native-tutorial-set-up-
react-native-on-mac-for-ios-and-android-
development-78a30a26aa3b#.cn29imr81
Setup Project (15 min)
• Enter to your coding directory (Maybe ~/code, or c:code, but not
c:windowssystem32)
• (Both) $ react-native init flexbox

(Both) $ cd flexbox
• Open index.ios.js current directory with your IDE

(Mac) $ atom index.ios.js

(Win) > notepad index.android.js
• (Win) Run your android emulator (e.g. Genymotion)
• (Mac) $ react-native run-ios

(Win) > react-native run-android
• Set up the Screen like this.
• Enable Hot Reloading
• Open Developer Menu by Command-D on Mac

or Menu Button in Android Simulator (for 

Windows)
• Tap Enable Hot Reloading
• Make Change the file, and hit Save.
• See the changes in Simulators.
Structure
JSX
• JSX is a JavaScript syntax extension that looks
similar to XML.
• We use a JSX to write User Interface (UI).
• JSX use camelCase.
• We use JSX at the render() function of a React
component.
index.ios.js

index.android.js
JSX Syntax
<Text>Hello World!</Text>
<Image
style={{height:100, width:100}}
source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
/>
Tag name: Text
Opening Tag Closing Tag
Tag body
Attribute Name Attribute ValueSelf Closing Tag
Attribute Value
• Using JavaScript Expression as Attribute Value,
Use { }
• Using String as Attribute Value, Use ''
Putting JS Logic in JSX
• Using JavaScript Statements, Put it between { }
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Comment
• To comment in JSX, Put it between {/* */}, {// … n 

}
One Outmost Parent Tag Rules
OK! 

Only one outmost parent tags: View
BAD! 

Multiple outmost parent tags: Text,Text
Basic Elements
<Text>Hello World!</Text>
iOS Android
<Image
style={{height:100, width:100}}
source={{uri: 'https://facebook.

github.io/react/img/logo_og.png'}}
/>
<Switch />
<View></View> (Container) (Container)
Basic Elements
<TextInput
style={{height:40, borderColor:

'gray', borderWidth: 1}}
value='Useless TextInput’
/>
iOS
Android<TextInput

multiLine={true}
numberOfLine={4}
style={{height:100, borderColor:

'gray', borderWidth: 1}}
value='Useless MultiLine TextInput’
/>
Basic Elements
<TouchableOpacity onPress={()=>{}}
style={{borderColor:'#f00',
backgroundColor:'#faa', borderWidth:
1, padding:10}}>
<Text>Touch me for Opacity!</Text>
</TouchableOpacity>
iOS & Android: Default
iOS & Android: Tapping
<TouchableHighlight onPress={()=>{}}
underlayColor='#f00a'
style={{borderColor:'#f00',
backgroundColor:'#faa', borderWidth:1,
padding:10}}>
<Text>Touch me for Highlight!</Text>
</TouchableHighlight>
JSX’s Example
Style
Basic CSS
View: Blue Box
80
80
80
8040
40
40
40
Margin
Padding
BorderRadius
20
Width: 200
Height: 200
View: Red Box+ Text
Flex:1
40
Exercise I (5 min)
More CSS for View
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
More CSS for Text
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Flexbox Layout
• Flexbox => CSS Flexible Box Layout (in W3C Last Call
Working Draft)
• Providing efficient way to layout, align and distribute space
among items in a container, even when their size is
unknown and/or dynamic (flex)
• Containers can alter its items width/height and order to
best fill the available space.
• Flexbox is a direction-agnostic, which support complex
applications (especially when it comes to orientation
changing, resizing, stretching, shrinking, etc.)
• main axis - Primary axis of a flex container, 

defined by flexDirection.
• main-start | main-end — Flex items placed within container
starting from main-start and going to main-end.

• main-size - Flex item’s width or height, whichever is in the
primary dimension.
Above is flexDirection = row (horizontal)
Above is flexDirection = row (horizontal)
• cross axis - Secondary axis that perpendicular to the 

primary axis (opposed with the flexDirection)
• cross-start | cross-end - Flex lines are filled with items and

placed into the container starting on the cross-start side or

on the cross-end side.

• cross-size - the flex item’s width or height, whichever is in

the cross dimension.
Two types of Flex properties
Containers
• flexDirection
• justifyContent
• alignItems
• flexWrap
Items
• flex
• alignSelf
Containers
• flexDirection
• justifyContent
• alignItems
• flexWrap
FlexDirection
Horizontally

flexDirection: row;
Vertically

flexDirection: column;
(Container)
Default flexDirection in React Native is column
Justify Content
• Adding justifyContent to a
component's style determines
the distribution of children
along the primary axis.
• Should children be distributed
at the start, the center, the end,
or spaced evenly?
• Available options are flex-
start, center, flex-
end, space-around, and
space-between.
• Default is flex-start
(Container)
flexDirection: ‘column’, 

justifyContent: ‘space-between’
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Align Items
• Adding alignItems to a
component's style determines
the alignment of children along
the secondary axis (if the
primary axis is row, then the
secondary is column, and vice
versa).
• Should children be aligned at
the start, the center, the end, or
stretched to fill?
• Available options are flex-
start, center, flex-
end, and stretch.
• Default is flex-start
(Container)
flexDirection: ‘column’, 

justifyContent: ‘center’, alignItems: ‘center’
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
FlexWrap
• By default, flex items will all try
to fit onto one line.
• Adding FlexWrap, You can
change that and allow the
items to wrap as needed with
this property.
• Direction also plays a role
here, determining the direction
new lines are stacked in.
• Available options are nowrap,
wrap
• Default is nowrap
(Container)
nowrap vs wrap
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Items
• flex
• alignSelf
Flex
• “Flex” CSS syntax applied to item elements to tell how much they can
stretches inside their container by compares with its siblings.
• {flex: (positive integer number)}, e.g., {flex : 1}
• They equally divide all container’s space by the sum of flex values of
their children, then allocate space according to each child’s flex score.
(Item)
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Align Self
• Adding alignSelf to a component's style determines the alignment of itself
along the secondary axis (overwrite the alignItems from its container).
• Available options are auto, flex-start, center, flex-end, and
stretch.
• Default is auto (Follow the alignItems from its container)
(Item)
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Colors
• '#f0f' (#rgb)
• '#f0fc' (#rgba)
• '#ff00ff' (#rrggbb)
• '#ff00ff00' (#rrggbbaa)
• 'rgb(255, 255, 255)'
• 'rgba(255, 255, 255,
1.0)'
• 'hsl(360, 100%, 100%)'
• 'hsla(360, 100%, 100%,
1.0)'
• 'transparent'
• 'red'
• 0xff00ff00 (0xrrggbbaa)
More Colors…
https://facebook.github.io/react-native/docs/colors.html
Exercise II (10 min)
Exercise III (15 min)
Exercise IV (15 min)

More Related Content

PDF
Creating Android Services with Delphi and RAD Studio 10 Seattle
PPTX
Advantages and disadvantages of a monorepo
PDF
Codemotion Madrid 2023 - Testcontainers y Spring Boot
PDF
MongoDB Europe 2016 - Warehousing MongoDB Data using Apache Beam and BigQuery
PPTX
Android Memory Management
PDF
“What’s Next in On-device Generative AI,” a Presentation from Qualcomm
PPTX
The Dictionary Project - Introduction
PDF
Appium: Automation for Mobile Apps
Creating Android Services with Delphi and RAD Studio 10 Seattle
Advantages and disadvantages of a monorepo
Codemotion Madrid 2023 - Testcontainers y Spring Boot
MongoDB Europe 2016 - Warehousing MongoDB Data using Apache Beam and BigQuery
Android Memory Management
“What’s Next in On-device Generative AI,” a Presentation from Qualcomm
The Dictionary Project - Introduction
Appium: Automation for Mobile Apps

What's hot (20)

PPTX
ZIP
Android Application Development
PDF
Hotwire: How To Build Reactive Rails Applications Without Javascript
PDF
HTML: An Introduction
PDF
Decorator Design Pattern Presentation
PPTX
Version control
PDF
Continuous Delivery Distilled
PPTX
An Introduction to ROS-Industrial
PPTX
ASP.NET Core MVC + Web API with Overview
PDF
Developer's Guide to JavaScript and Web Cryptography
PDF
OCamlでWebアプリケーションを作るn個の方法
DOCX
Android seminar-report-body.doc
PPTX
Introduction to Android and Android Studio
PPTX
The Clean Architecture
PPTX
Android Development : (Android Studio, PHP, XML, MySQL)
PPTX
Java - Tutorial Ventanas
PPTX
Build web apps with react js
PDF
Explorations of the three legged performance stool
PPTX
Android platform
PPTX
iOS Architecture
Android Application Development
Hotwire: How To Build Reactive Rails Applications Without Javascript
HTML: An Introduction
Decorator Design Pattern Presentation
Version control
Continuous Delivery Distilled
An Introduction to ROS-Industrial
ASP.NET Core MVC + Web API with Overview
Developer's Guide to JavaScript and Web Cryptography
OCamlでWebアプリケーションを作るn個の方法
Android seminar-report-body.doc
Introduction to Android and Android Studio
The Clean Architecture
Android Development : (Android Studio, PHP, XML, MySQL)
Java - Tutorial Ventanas
Build web apps with react js
Explorations of the three legged performance stool
Android platform
iOS Architecture
Ad

Similar to [React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox (20)

PPTX
sesion4SDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
PPTX
Beautiful UI in react native By - nativebase.io
PPTX
2. react - native: basic
PDF
Understanding Flexbox Layout in React Native.pdf
PPTX
Build Mobile Application with React-Native
PDF
Lessons from a year of building apps with React Native
PPT
PDF
Learning React Native Building Native Mobile Apps with JavaScript 2nd Edition...
PPTX
JS Fest 2018. Илья Иванов. Введение в React-Native
PDF
React Native
PDF
An iOS Developer's Perspective on React Native
PDF
Workshop 24: React Native Introduction
PPTX
React native starter
PPTX
React Native & NativeScript
PDF
Learning React Native Building Native Mobile Apps With Javascript 2nd Edition...
PPTX
React Native
PDF
Learning React Native Building Native Mobile Apps with JavaScript 2nd Edition...
PDF
Pieter De Baets - An introduction to React Native
PDF
React Native Workshop - React Alicante
PDF
Flexbox Will Shock You!
sesion4SDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
Beautiful UI in react native By - nativebase.io
2. react - native: basic
Understanding Flexbox Layout in React Native.pdf
Build Mobile Application with React-Native
Lessons from a year of building apps with React Native
Learning React Native Building Native Mobile Apps with JavaScript 2nd Edition...
JS Fest 2018. Илья Иванов. Введение в React-Native
React Native
An iOS Developer's Perspective on React Native
Workshop 24: React Native Introduction
React native starter
React Native & NativeScript
Learning React Native Building Native Mobile Apps With Javascript 2nd Edition...
React Native
Learning React Native Building Native Mobile Apps with JavaScript 2nd Edition...
Pieter De Baets - An introduction to React Native
React Native Workshop - React Alicante
Flexbox Will Shock You!
Ad

More from Kobkrit Viriyayudhakorn (20)

PDF
Thai E-Voting System
PPTX
Thai National ID Card OCR
PPTX
Chochae Robot - Thai voice communication extension pack for Service Robot
PDF
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
PDF
Thai Text processing by Transfer Learning using Transformer (Bert)
PDF
How Emoticon Affects Chatbot Users
PPTX
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
PDF
Check Raka Chatbot Pitching Presentation
PPTX
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
PPTX
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
PPTX
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
PDF
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
PDF
Lecture 12: React-Native Firebase Authentication
PDF
Unity Google VR Cardboard Deployment on iOS and Android
PDF
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
PDF
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
PDF
Lecture 2: C# Programming for VR application in Unity
PDF
Lecture 1 Introduction to VR Programming
PDF
Thai Word Embedding with Tensorflow
PDF
Lecture 3 - ES6 Script Advanced for React-Native
Thai E-Voting System
Thai National ID Card OCR
Chochae Robot - Thai voice communication extension pack for Service Robot
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
Thai Text processing by Transfer Learning using Transformer (Bert)
How Emoticon Affects Chatbot Users
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
Check Raka Chatbot Pitching Presentation
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
Lecture 12: React-Native Firebase Authentication
Unity Google VR Cardboard Deployment on iOS and Android
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 2: C# Programming for VR application in Unity
Lecture 1 Introduction to VR Programming
Thai Word Embedding with Tensorflow
Lecture 3 - ES6 Script Advanced for React-Native

Recently uploaded (20)

PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
AI in Product Development-omnex systems
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
top salesforce developer skills in 2025.pdf
PPTX
Introduction to Artificial Intelligence
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Essential Infomation Tech presentation.pptx
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Mini project ppt template for panimalar Engineering college
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPT
JAVA ppt tutorial basics to learn java programming
PDF
medical staffing services at VALiNTRY
Odoo POS Development Services by CandidRoot Solutions
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Materi-Enum-and-Record-Data-Type (1).pptx
AI in Product Development-omnex systems
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
top salesforce developer skills in 2025.pdf
Introduction to Artificial Intelligence
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Upgrade and Innovation Strategies for SAP ERP Customers
PTS Company Brochure 2025 (1).pdf.......
Which alternative to Crystal Reports is best for small or large businesses.pdf
Essential Infomation Tech presentation.pptx
ManageIQ - Sprint 268 Review - Slide Deck
How to Migrate SBCGlobal Email to Yahoo Easily
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Mini project ppt template for panimalar Engineering college
L1 - Introduction to python Backend.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
JAVA ppt tutorial basics to learn java programming
medical staffing services at VALiNTRY

[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox

  • 2. All source code • https://github.com/kobkrit/react-native-class-2017
  • 4. Prepare ENV for making Android App by
 React-Native on Windows • See https://kobkrit.com/react-native-tutorial-react- native-setup-on-windows-for-android-development- walkthrough-a463e825159d#.joucl9xkg
  • 5. Prepare ENV for making Android App by
 React-Native on Mac • https://kobkrit.com/react-native-tutorial-set-up- react-native-on-mac-for-ios-and-android- development-78a30a26aa3b#.cn29imr81
  • 6. Setup Project (15 min) • Enter to your coding directory (Maybe ~/code, or c:code, but not c:windowssystem32) • (Both) $ react-native init flexbox
 (Both) $ cd flexbox • Open index.ios.js current directory with your IDE
 (Mac) $ atom index.ios.js
 (Win) > notepad index.android.js • (Win) Run your android emulator (e.g. Genymotion) • (Mac) $ react-native run-ios
 (Win) > react-native run-android
  • 7. • Set up the Screen like this. • Enable Hot Reloading • Open Developer Menu by Command-D on Mac
 or Menu Button in Android Simulator (for 
 Windows) • Tap Enable Hot Reloading • Make Change the file, and hit Save. • See the changes in Simulators.
  • 9. JSX • JSX is a JavaScript syntax extension that looks similar to XML. • We use a JSX to write User Interface (UI). • JSX use camelCase. • We use JSX at the render() function of a React component.
  • 11. JSX Syntax <Text>Hello World!</Text> <Image style={{height:100, width:100}} source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}} /> Tag name: Text Opening Tag Closing Tag Tag body Attribute Name Attribute ValueSelf Closing Tag
  • 12. Attribute Value • Using JavaScript Expression as Attribute Value, Use { } • Using String as Attribute Value, Use ''
  • 13. Putting JS Logic in JSX • Using JavaScript Statements, Put it between { }
  • 15. Comment • To comment in JSX, Put it between {/* */}, {// … n 
 }
  • 16. One Outmost Parent Tag Rules OK! 
 Only one outmost parent tags: View BAD! 
 Multiple outmost parent tags: Text,Text
  • 17. Basic Elements <Text>Hello World!</Text> iOS Android <Image style={{height:100, width:100}} source={{uri: 'https://facebook.
 github.io/react/img/logo_og.png'}} /> <Switch /> <View></View> (Container) (Container)
  • 18. Basic Elements <TextInput style={{height:40, borderColor:
 'gray', borderWidth: 1}} value='Useless TextInput’ /> iOS Android<TextInput
 multiLine={true} numberOfLine={4} style={{height:100, borderColor:
 'gray', borderWidth: 1}} value='Useless MultiLine TextInput’ />
  • 19. Basic Elements <TouchableOpacity onPress={()=>{}} style={{borderColor:'#f00', backgroundColor:'#faa', borderWidth: 1, padding:10}}> <Text>Touch me for Opacity!</Text> </TouchableOpacity> iOS & Android: Default iOS & Android: Tapping <TouchableHighlight onPress={()=>{}} underlayColor='#f00a' style={{borderColor:'#f00', backgroundColor:'#faa', borderWidth:1, padding:10}}> <Text>Touch me for Highlight!</Text> </TouchableHighlight>
  • 21. Style
  • 24. View: Red Box+ Text Flex:1 40
  • 26. More CSS for View
  • 29. More CSS for Text
  • 31. Flexbox Layout • Flexbox => CSS Flexible Box Layout (in W3C Last Call Working Draft) • Providing efficient way to layout, align and distribute space among items in a container, even when their size is unknown and/or dynamic (flex) • Containers can alter its items width/height and order to best fill the available space. • Flexbox is a direction-agnostic, which support complex applications (especially when it comes to orientation changing, resizing, stretching, shrinking, etc.)
  • 32. • main axis - Primary axis of a flex container, 
 defined by flexDirection. • main-start | main-end — Flex items placed within container starting from main-start and going to main-end.
 • main-size - Flex item’s width or height, whichever is in the primary dimension. Above is flexDirection = row (horizontal)
  • 33. Above is flexDirection = row (horizontal) • cross axis - Secondary axis that perpendicular to the 
 primary axis (opposed with the flexDirection) • cross-start | cross-end - Flex lines are filled with items and
 placed into the container starting on the cross-start side or
 on the cross-end side.
 • cross-size - the flex item’s width or height, whichever is in
 the cross dimension.
  • 34. Two types of Flex properties Containers • flexDirection • justifyContent • alignItems • flexWrap Items • flex • alignSelf
  • 37. Default flexDirection in React Native is column
  • 38. Justify Content • Adding justifyContent to a component's style determines the distribution of children along the primary axis. • Should children be distributed at the start, the center, the end, or spaced evenly? • Available options are flex- start, center, flex- end, space-around, and space-between. • Default is flex-start (Container) flexDirection: ‘column’, 
 justifyContent: ‘space-between’
  • 40. Align Items • Adding alignItems to a component's style determines the alignment of children along the secondary axis (if the primary axis is row, then the secondary is column, and vice versa). • Should children be aligned at the start, the center, the end, or stretched to fill? • Available options are flex- start, center, flex- end, and stretch. • Default is flex-start (Container) flexDirection: ‘column’, 
 justifyContent: ‘center’, alignItems: ‘center’
  • 42. FlexWrap • By default, flex items will all try to fit onto one line. • Adding FlexWrap, You can change that and allow the items to wrap as needed with this property. • Direction also plays a role here, determining the direction new lines are stacked in. • Available options are nowrap, wrap • Default is nowrap (Container) nowrap vs wrap
  • 45. Flex • “Flex” CSS syntax applied to item elements to tell how much they can stretches inside their container by compares with its siblings. • {flex: (positive integer number)}, e.g., {flex : 1} • They equally divide all container’s space by the sum of flex values of their children, then allocate space according to each child’s flex score. (Item)
  • 47. Align Self • Adding alignSelf to a component's style determines the alignment of itself along the secondary axis (overwrite the alignItems from its container). • Available options are auto, flex-start, center, flex-end, and stretch. • Default is auto (Follow the alignItems from its container) (Item)
  • 49. Colors • '#f0f' (#rgb) • '#f0fc' (#rgba) • '#ff00ff' (#rrggbb) • '#ff00ff00' (#rrggbbaa) • 'rgb(255, 255, 255)' • 'rgba(255, 255, 255, 1.0)' • 'hsl(360, 100%, 100%)' • 'hsla(360, 100%, 100%, 1.0)' • 'transparent' • 'red' • 0xff00ff00 (0xrrggbbaa)