Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Hands-On Design Patterns with React Native

You're reading from   Hands-On Design Patterns with React Native Proven techniques and patterns for efficient native mobile development with JavaScript

Arrow left icon
Product type Paperback
Published in Sep 2018
Publisher Packt
ISBN-13 9781788994460
Length 302 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Grzesiukiewicz Grzesiukiewicz
Author Profile Icon Grzesiukiewicz
Grzesiukiewicz
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Title Page
Copyright and Credits
Dedication
Packt.com
Contributors
Preface
1. React Component Patterns FREE CHAPTER 2. View Patterns 3. Styling Patterns 4. Flux Architecture 5. Store Patterns 6. Data Transfer Patterns 7. Navigation Patterns 8. JavaScript and ECMAScript Patterns 9. Elements of Functional Programming Patterns 10. Managing Dependencies 11. Type Checking Patterns 1. Other Books You May Enjoy Index

Chapter 1. React Component Patterns

The development for Android an iOS has never been easier than now. React Native has changed how fast we develop new apps and deliver value to the end user. Knowing this technology will give you a great edge on the market. I'm Matt and I'm happy to show you the best practices I have learnt while working in a React Native ecosystem. Through this book we will explore design patterns by example. In just this first chapter we will create over 10 small applications. Later on in the book we will create more complex applications as we learn new things.

In this chapter we will explore React patterns that also apply to React Native world. The most crucial patterns you need to understand are stateless and stateful components. Understanding how to use those will make you a much better React Native developer and empower you with standard patterns in every React Native application.

When it comes to components it is crucial to make them as reusable as possible and follow the well-known programmer principle – DRY: Don't Repeat Yourself. Presentational components and container components are meant to do just that. We will dive into them with a couple of examples to learn how to split the features into reusable pieces.

To be more precise we will look at the following topics:

  • Stateless and stateful components with short and then more complex examples
  • When and why use different types of components
  • How to create reusable and easily configurable presentational components 
  • Container components and their role in encapsulation of features

Time to act on your side. Prepare your environment for React Native development right now if you want to follow along and play with the examples. Make sure that you can check the Hello World text on your mobile or simulator.

 

You have been reading a chapter from
Hands-On Design Patterns with React Native
Published in: Sep 2018
Publisher: Packt
ISBN-13: 9781788994460
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Visually different images