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

What this book covers

Chapter 1, What are React and React Native?, will start by going over a brief history of web development to achieve a better understanding of the ideas behind the creation of React and React Native. We will also talk about ReactJS concepts, and we will get acquainted with React Native code.

Chapter 2, Managing State in a Simple React App, will talk about some real-life problems that React developers face. We will concentrate on robust state management for medium-sized and large applications. Since React itself was not created with the tools to manage global states, we will look at modern React solutions and other state management strategies.

Chapter 3, Planning and Setting Up the Funbook App, will get into coding for real here! We will create our very own app, a social media clone app, called Funbook. We will learn about popular tools, especially Expo, and the React Native ecosystem.

Chapter 4, Styling and Populating the Funbook App, will be all about making the app we have on our hands look good. We will also populate it with some data so that we can work on a project that’s close to how a real production app may work.

Chapter 5, Implementing Redux in Our Funbook App, will explore the tumultuous history of Redux and then go over configuring Redux and Redux Toolkit in the app. Once the dependencies are set up, we will move on to implementing the like button and the list of liked images with the help of Redux. This chapter includes responses from a short conversation I had with the main Redux and Redux Toolkit maintainer – Mark Erikson, also known by his Twitter handle @acemarke.

Chapter 6, Using MobX as a State Manager in a React Native App, will return to the bare React Native app we created in Chapters 1 to 4, and this time, we will add MobX and MobX-State-Tree into the mix. We will start with how this library came to be, and then move on to configuring it in the Funbook app. Once we’re ready, we will use it for the liked images list and the like button. This chapter includes responses from an exchange I had with the MobX-State-Tree maintainer – Jamon Holmgren.

Chapter 7, Untangling Complex Flows in React Native Apps with XState, will go deeper into some advanced math problems, as XState is based on advanced mathematical concepts. When we have a handle on them, we will move on to configuring XState in the Funbook app and using it for the liked images functionality.

This chapter includes responses I received from the creator of XState – David Khourshid, better known on the internet as DavidKPiano.

Chapter 8, Integrating Jotai in a React Native App, will return to the bare Funbook app again, and this time, we will implement the youngest state management library in this book: Jotai. We will learn about its concepts, configure it, and use it for the liked button and liked images list functionality. This chapter includes responses from a conversation I had with the creator of Jotai, Daishi Kato.

Chapter 9, Using React Query for Server-Side - Driven State Management, will look at the problem of state management in a very new way: maybe we don’t need state management libraries at all. Maybe all we must do is effectively manage data fetching. In order to test this hypothesis, we will install, configure, and use React Query, also known as TanStack Query.

Chapter 10, Appendix, will take a bird’s eye view of everything that we have learned about in the book. I have also included a few common job interview questions that are pertinent to the topic of state management in React Native apps.

lock icon The rest of the chapter is locked
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 €18.99/month. Cancel anytime