SlideShare uma empresa Scribd logo
1 de 22
Getting started with React
Native: Building UI
nativebase.io/
Building Beautiful UI in React Native
• Building a User Interface (UI) for mobile apps is more difficult than doing
the same for a web app. The reasons for this are :
• Mobile devices have limited screen size.
• Each type of mobile device (tablets, smartphones etc) is different from the
other and they all require various kinds of support.
• Android and Apple have their own respective platform standards that a
developer should follow. So an app built to work on Android devices will
need its code to be changed in order to run on Apple devices.
What is React Native?
React Native is an open source JavaScript library that enables a developer to
build cross-platform apps.
Installation
• Before we start building the UI, let’s make sure that you have installed
React Native on your system.
• Click here and follow the steps carefully. Once you have successfully
installed React Native, we can get started with building an UI with the help
of React Native.
Let’s Take a Button Component
This component has two parts: the caption which
says “Awesome Button” and the blue box with
rounded corners surrounding the caption. In
React Native, the box is declared
in <TouchableOpacity />and the caption is
declared in <Text />.
How to
design
awesome
button
Style can be
declared
separately instead
of doing it inside
the class.
How To Layout?
Let’s try creating a Layout using React Native
A screen has 3 basic parts:
• Header
• Content Area
• Footer
Layout
• The Header and Footer are similar since they both need to
have a fixed height, a background color with white text and
the user should not be able to scroll them.
• The content area, on the other hand should have fluid height
so that the user can scroll in this area.
• <View />is used for header and footer and <Scroll View />is
used for content area. <Scroll View />is same as <View
/>with the exception that the user can scroll with <Scroll
View />.
The screen we get by writing the code shown on left would look something
like image shown on right side
Adding a color using
component looks like this
Few errors in alignment
There are still a few errors in this screen. The content
area is not properly visible and the header and footer
text is at the side rather than at center. We use Flex
box to align it properly .
Flexbox
To position elements on your screen, you can
use Flexbox. Flexbox is a layout module based
on CSS3
Two parts of Layout
• The layout is divided into two parts:
Container and Items.
• Flexbox has separate properties for
containers and items.
• Container properties like flex-direction,
align-items and justify-content set the
layout rules for the items inside the
container.
Flex Direction
flex-direction defines the direction in
which the items are placed in the container.
Align-items
align-items defines the default behaviour for how items are laid out along the cross axis on
the current line.
Justify-Content
justify-content defines the alignment along the main axis. It helps distribute
extra free space left over when either all the flex items on a line are
inflexible, or are flexible but have reached their maximum size.
Align-Self
1. Item properties like align-
self, flex, and aspect-ratio
set the layout rules for a
particular item in the
container. Item properties
take precedence over
container properties.
2. align-self allows the
default alignment (or the
alignment set by a
container property) to be
overridden for an
individual item.
Usage of property Flex
• By using the item property flex, which is a
combination of flex-grow, flex-shrink, and flex-basis,
our layout will now change , Use the align-items and
justify-content property to bring your header and
footer text to the center.
• Our layout looks much better than what we had
initially started with. But UI contains a lot more than
just rectangular boxes and buttons.
Icons
• React Native has over 3000
icons which can be accessed
from “react-native-vector-
icons” package.
• Writing this code will get
above icon
Custom Shapes
We can also design custom shapes in React Native using the
“react-native-svg” package.
To get the shape of right end we will write our code as
Adding UI
elements
• But is that all we need to build a
beautiful UI? What about Tabs,
Cards, Swiper…..?
• Building apps using React Native
would be much easier if there was
a generic set of UI components.
We knew this was essential since
long back.
• That’s why we built NativeBase, an
open source UI components
library for React Native.
Change in
Screen after
importing UI
Components
Takeaways
Finally, we can summarize that:
• Building UI in React Native is quite similar to the web.
• Flexbox is necessary to build better layouts in React Native.
• Using third party libraries like NativeBase can help you save time that is
used for development in React Native.

Mais conteúdo relacionado

Semelhante a Beautiful UI in react native By - nativebase.io

Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Building an Adaptive App in Ember
Building an Adaptive App in EmberBuilding an Adaptive App in Ember
Building an Adaptive App in EmberFeather Knee
 
Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Michael Shrove
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationVu Tran Lam
 
Top 7 react developer tools to use in 2021
Top 7 react developer tools to use in 2021Top 7 react developer tools to use in 2021
Top 7 react developer tools to use in 2021WrapPixel
 
[React Native Tutorial] Lecture 6: Component, Props, and Network
[React Native Tutorial] Lecture 6: Component, Props, and Network[React Native Tutorial] Lecture 6: Component, Props, and Network
[React Native Tutorial] Lecture 6: Component, Props, and NetworkKobkrit Viriyayudhakorn
 
Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)Knoldus Inc.
 
Assignment1 A 0
Assignment1 A 0Assignment1 A 0
Assignment1 A 0Mahmoud
 
IOS Swift language 1st Tutorial
IOS Swift language 1st TutorialIOS Swift language 1st Tutorial
IOS Swift language 1st TutorialHassan A-j
 
Basics of expression blend4
Basics of expression blend4Basics of expression blend4
Basics of expression blend4Samson Tennela
 
What is ui element in i phone developmetn
What is ui element in i phone developmetnWhat is ui element in i phone developmetn
What is ui element in i phone developmetnTOPS Technologies
 

Semelhante a Beautiful UI in react native By - nativebase.io (20)

Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Building an Adaptive App in Ember
Building an Adaptive App in EmberBuilding an Adaptive App in Ember
Building an Adaptive App in Ember
 
adaptive_ember
adaptive_emberadaptive_ember
adaptive_ember
 
Jquery Mobile
Jquery MobileJquery Mobile
Jquery Mobile
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)Android and IOS UI Development (Android 5.0 and iOS 9.0)
Android and IOS UI Development (Android 5.0 and iOS 9.0)
 
Session 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 applicationSession 8 - Xcode 5 and interface builder for iOS 7 application
Session 8 - Xcode 5 and interface builder for iOS 7 application
 
Top 7 react developer tools to use in 2021
Top 7 react developer tools to use in 2021Top 7 react developer tools to use in 2021
Top 7 react developer tools to use in 2021
 
[React Native Tutorial] Lecture 6: Component, Props, and Network
[React Native Tutorial] Lecture 6: Component, Props, and Network[React Native Tutorial] Lecture 6: Component, Props, and Network
[React Native Tutorial] Lecture 6: Component, Props, and Network
 
Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)
 
Assignment1 A 0
Assignment1 A 0Assignment1 A 0
Assignment1 A 0
 
IOS Swift language 1st Tutorial
IOS Swift language 1st TutorialIOS Swift language 1st Tutorial
IOS Swift language 1st Tutorial
 
iOS storyboard
iOS storyboardiOS storyboard
iOS storyboard
 
Diving deep in compose.pdf
Diving deep in compose.pdfDiving deep in compose.pdf
Diving deep in compose.pdf
 
Chapter3 mo
Chapter3 moChapter3 mo
Chapter3 mo
 
Mobile Application Development class 003
Mobile Application Development class 003Mobile Application Development class 003
Mobile Application Development class 003
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Basics of expression blend4
Basics of expression blend4Basics of expression blend4
Basics of expression blend4
 
What is ui element in i phone developmetn
What is ui element in i phone developmetnWhat is ui element in i phone developmetn
What is ui element in i phone developmetn
 
Visual Basic.pptx
Visual Basic.pptxVisual Basic.pptx
Visual Basic.pptx
 

Último

Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxAnnaArtyushina1
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 

Último (20)

Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

Beautiful UI in react native By - nativebase.io

  • 1. Getting started with React Native: Building UI nativebase.io/
  • 2. Building Beautiful UI in React Native • Building a User Interface (UI) for mobile apps is more difficult than doing the same for a web app. The reasons for this are : • Mobile devices have limited screen size. • Each type of mobile device (tablets, smartphones etc) is different from the other and they all require various kinds of support. • Android and Apple have their own respective platform standards that a developer should follow. So an app built to work on Android devices will need its code to be changed in order to run on Apple devices.
  • 3. What is React Native? React Native is an open source JavaScript library that enables a developer to build cross-platform apps. Installation • Before we start building the UI, let’s make sure that you have installed React Native on your system. • Click here and follow the steps carefully. Once you have successfully installed React Native, we can get started with building an UI with the help of React Native.
  • 4. Let’s Take a Button Component This component has two parts: the caption which says “Awesome Button” and the blue box with rounded corners surrounding the caption. In React Native, the box is declared in <TouchableOpacity />and the caption is declared in <Text />.
  • 6. Style can be declared separately instead of doing it inside the class.
  • 7. How To Layout? Let’s try creating a Layout using React Native A screen has 3 basic parts: • Header • Content Area • Footer
  • 8. Layout • The Header and Footer are similar since they both need to have a fixed height, a background color with white text and the user should not be able to scroll them. • The content area, on the other hand should have fluid height so that the user can scroll in this area. • <View />is used for header and footer and <Scroll View />is used for content area. <Scroll View />is same as <View />with the exception that the user can scroll with <Scroll View />.
  • 9. The screen we get by writing the code shown on left would look something like image shown on right side
  • 10. Adding a color using component looks like this
  • 11. Few errors in alignment There are still a few errors in this screen. The content area is not properly visible and the header and footer text is at the side rather than at center. We use Flex box to align it properly . Flexbox To position elements on your screen, you can use Flexbox. Flexbox is a layout module based on CSS3
  • 12. Two parts of Layout • The layout is divided into two parts: Container and Items. • Flexbox has separate properties for containers and items. • Container properties like flex-direction, align-items and justify-content set the layout rules for the items inside the container.
  • 13. Flex Direction flex-direction defines the direction in which the items are placed in the container.
  • 14. Align-items align-items defines the default behaviour for how items are laid out along the cross axis on the current line.
  • 15. Justify-Content justify-content defines the alignment along the main axis. It helps distribute extra free space left over when either all the flex items on a line are inflexible, or are flexible but have reached their maximum size.
  • 16. Align-Self 1. Item properties like align- self, flex, and aspect-ratio set the layout rules for a particular item in the container. Item properties take precedence over container properties. 2. align-self allows the default alignment (or the alignment set by a container property) to be overridden for an individual item.
  • 17. Usage of property Flex • By using the item property flex, which is a combination of flex-grow, flex-shrink, and flex-basis, our layout will now change , Use the align-items and justify-content property to bring your header and footer text to the center. • Our layout looks much better than what we had initially started with. But UI contains a lot more than just rectangular boxes and buttons.
  • 18. Icons • React Native has over 3000 icons which can be accessed from “react-native-vector- icons” package. • Writing this code will get above icon
  • 19. Custom Shapes We can also design custom shapes in React Native using the “react-native-svg” package. To get the shape of right end we will write our code as
  • 20. Adding UI elements • But is that all we need to build a beautiful UI? What about Tabs, Cards, Swiper…..? • Building apps using React Native would be much easier if there was a generic set of UI components. We knew this was essential since long back. • That’s why we built NativeBase, an open source UI components library for React Native.
  • 22. Takeaways Finally, we can summarize that: • Building UI in React Native is quite similar to the web. • Flexbox is necessary to build better layouts in React Native. • Using third party libraries like NativeBase can help you save time that is used for development in React Native.