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

Preface

Welcome to the wonderful world of React Native apps! Thanks to this technology, you can have your own native app up and running in a matter of minutes. Don’t worry if this is the first time you are hearing about React Native. Basic knowledge of JavaScript will be enough to hit the ground running. Together, we will go over the important concepts of React and React Native and we will learn about the React Native ecosystem, setup, and tooling. By the end of Chapter 4, Styling and Populating the Funbook App, you will have a fully functioning social-media clone app in your hands.

This is where stuff starts getting interesting. Our app has a few API endpoints and needs to manage data objects across multiple components and screens. This situation is very common in medium-sized and large applications. Because of this, there are many solutions to this common problem. A lot of developers use battle-tested and renowned open-source libraries, such as Redux or MobX. Others look for innovative ideas and land on XState or Jotai for their projects. Others still use built-in React functionalities or concentrate on data fetching instead of state management with the help of React Query. Throughout this book, we will put ourselves in the shoes of all of these types of developers. We will pick one specific functionality from the app – the like button with the list of liked images – and we will try out the open source libraries listed here, one by one.

When we emerge victorious at the end of this book, you will have a very good understanding of different ways to manage states in React Native apps. I hope you will also have an idea of what you prefer, and why. Redux, MobX, XState, Jotai, and React Query were created to solve the same problem, but their creators approached it very differently. I also hope you will simply enjoy this book as much as I’ve enjoyed writing it.

lock icon The rest of the chapter is locked
Next Section arrow right
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