Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Simplifying State Management in React Native

You're reading from   Simplifying State Management in React Native Master state management from hooks and context through to Redux, MobX, XState, Jotai and React Query

Arrow left icon
Product type Paperback
Published in Jan 2023
Publisher Packt
ISBN-13 9781803235035
Length 202 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Aleksandra Desmurs-Linczewska Aleksandra Desmurs-Linczewska
Author Profile Icon Aleksandra Desmurs-Linczewska
Aleksandra Desmurs-Linczewska
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Part 1 – Learn the Basics: Intro to React, States, Props, Hooks, and Context
2. Chapter 1: What are React and React Native? FREE CHAPTER 3. Chapter 2: Managing State in a Simple React App 4. Part 2 – Creating a Real, Working App
5. Chapter 3: Planning and Setting Up the Funbook App 6. Chapter 4: Styling and Populating the Funbook App 7. Part 3 – Exploring Various Libraries for State Management in React Native
8. Chapter 5: Implementing Redux in Our Funbook App 9. Chapter 6: Using MobX as a State Manager in a React Native App 10. Chapter 7: Untangling Complex Flows in React Native Apps with XState 11. Chapter 8: Integrating Jotai in a React Native App 12. Chapter 9: Using React Query for Server-Side-Driven State Management 13. Part 4 – Summary
14. Chapter 10: Appendix 15. Index 16. Other Books You May Enjoy

Understanding cross-platform software development

Before talking about React Native, we need to go over the landscape of mobile app development.

It is quite obvious that mobile apps can be created using native platform programming languages. The ones considered most modern are Swift, for iOS development, and Kotlin, for Android development. Many developers still use Objective-C and Java, respectively. However, when the market of mobile phones settled down with the two giants, Apple and Google, it was tempting to create solutions that could be written once for both platforms. Similarly, for websites, which can be opened in any browser, why can’t we have apps that can be run on any device?

Looking for this mythical cross-platform solution was enticing to many companies. They were hiring separate teams from iOS and Android to end up with apps that do not look and feel the same.

The software development world is vast, and we can find many solutions to a single problem. Cross-platform development is not an exception to this rule. If you google cross-platform apps, you will find a solution from Microsoft, called Xamarin. You will also find Flutter, written in a language called Dart. And finally, you will find many solutions based on JavaScript. One of the first meaningful players was Ionic. Ionic is a framework, built in 2013, for development in AngularJS, and it uses Apache Cordova behind the scenes. Ionic developers build their apps using the exact same syntax they would use to create a website. At build time, a native app wrapper with a single WebView is created. The Ionic code is run inside this WebView. Given this structure, many people call Ionic apps hybrid apps to differentiate them from cross-platform apps.

React Native is a completely different solution. In its case, code is compiled into a complete native app. JavaScript code runs in the app and communicates with the phone’s native modules through a bridge. But where did React Native come from, you may ask?

Let’s dive into that topic in our next section.

You have been reading a chapter from
Simplifying State Management in React Native
Published in: Jan 2023
Publisher: Packt
ISBN-13: 9781803235035
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 $19.99/month. Cancel anytime