illustration for Sync State Across Components with Recoil in React
pro

Sync State Across Components with Recoil in React

Instructor

Tomasz Łakomy
5m closed-captioning
Updated 2 weeks ago
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.5
727
people completed
Bookmark
Download
RSS

This course will give you a clear understanding of how to start managing state with Recoil.

Recoil is a state management library for React applications. It provides several capabilities that are difficult to achieve with React alone. It aims to solve a few problems such as shared state, derived data, asynchronous queries, app-wide state observation, routing, and many more issues when managing complex state.

If you are working on an application that is going to need state sync between components, derived state, app-wide observation, Recoil might be the appropriate library for you!

This course will guide you on how to implement Recoil's Hooks in a quick project where you'll have an integer stored on an atom and the use of selectors will allow you to re-calculate a derived state, which in this case, it will calculate the square of your integer.

💎 This is a Classic Course

An efficient and practical course to learning Recoil. The Recoil version used in this course is ^0.0.7, and the latest version is 0.3.1, yet this is still a great introduction to understanding the core functionality of Recoil. As of 0.3.1, there are no major breaking changes.

What you'll learn:

  • Add Recoil to your React project
  • Create a Recoil `atom` and use it to store a piece of state
  • Use `useRecoilState` hook to read and write an atom
  • Use `useRecoilValue` to access the value stored in an atom in a read-only fashion
  • Use 🔥`selectors`🔥 in order to calculate derived data based on state stored within atoms (this is *really* powerful!)

Questions to Reflect Upon:

  • How do you know when you need to use a state management library?
  • Why is state management challenging?
  • Why does state need to be managed?

Learner Reviews

  • Lauro Silva
    2 weeks ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    A wonderful, efficient introduction to Recoil! Just what I needed to get started.

  • Will Johnson
    2 weeks ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    I can't believe how much was packed into just 5 mins.

  • Zac Jones
    a month ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    A really great introduction to Recoil. I have the knowledge I need to get started using it in my own app

  • Mouzayan
    6 months ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    The course showed me how to use Recoil and it displayed various ways in which Recoil hooks can be super useful.

  • Learner
    6 months ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    it's easy to follow si comprehensive

  • Felipe Segall
    6 months ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    I didn't know how recoil worked 10 minutes ago.

Course Content

5m • 3 lessons

    You might also like these resources:

    illustration for Introduction to Cloudflare Workers
    Kristian Freeman・36m・Course

    Become familiar with the Workers CLI wrangler that we will use to bootstrap our Worker project. From there you'll understand how a Worker receives and returns requests/Responses. We will also build this serverless function locally for development and deploy it to a custom domain.

    illustration for Create an eCommerce Store with Next.js and Stripe Checkout
    Colby Fayock・1h 4m・Course

    This is a practical project based look at building a working e-commerce store using modern tools and APIs. Excellent for a weekend side-project for your developer project portfolio

    illustration for Practical Git for Everyday Professional Use
    Trevor Miller・1h・Course

    git is a critical component in the modern web developers tool box. This course is a solid introduction and goes beyond the basics with some more advanced git commands you are sure to find useful.