Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Simplifying State Management in React Native
  • Toc
  • feedback
Simplifying State Management in React Native

Simplifying State Management in React Native

By : Aleksandra Desmurs-Linczewska
5 (3)
close
Simplifying State Management in React Native

Simplifying State Management in React Native

5 (3)
By: Aleksandra Desmurs-Linczewska

Overview of this book

Managing state in a React Native app can be challenging as it is one of the most difficult concepts to grasp while learning React Native. This is because there are so many ways to do it, and because there is a lack of clear guidelines on what should be used and why. Simplifying State Management in React Native is a comprehensive introduction for those who are new to creating robust React Native apps that will have you up to speed in no time. You’ll get to grips with the different state management strategies and libraries available. As you progress through the chapters, you’ll try out different solutions, as well as compare and choose which solution is perfectly suited to your future projects and personal preferences. Finally, you’ll create a social media clone app using all the concepts and examples that you’ve learned in this book. By the end of this book, you’ll be able to take on existing projects that use various state management strategies and libraries, and confidently make decisions about state management.
Table of Contents (17 chapters)
close
1
Part 1 – Learn the Basics: Intro to React, States, Props, Hooks, and Context
4
Part 2 – Creating a Real, Working App
7
Part 3 – Exploring Various Libraries for State Management in React Native
13
Part 4 – Summary
14
Chapter 10: Appendix

Pulling in data for the app

Welcome back! Did you take a moment to look at our app code? Did you clone the repo from the chapter-3 branch, or did you create your own components following the broad strokes I described previously? Either way, I’m glad you’re here! Let’s fetch some data and use some state!

A quick reminder about the data we’ll be using: I set up GitHub Pages in the /docs folder, which you can find here: https://github.com/PacktPublishing/Simplifying-State-Management-in-React-Native/tree/main/docs.

You can preview every JSON file right in the GitHub UI. You can also view the raw contents of any file by clicking the Raw button:

Figure 4.2 – GitHub UI with the Raw button circled in red

The text file visible after clicking this button is what you could see as an API response.

We’ll start with fetching the list of users. This list contains user IDs and links to user avatars. Our API depends on us to...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete