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
·
3 lessons
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.4
971
people completed
Published 4 years ago
|
Updated 3 years ago

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.

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!)

Course Content

5m • 3 lessons

    You might also like these resources:

    illustration for Getting Started with Recoil in React
    Chris Achard ・16m・Course

    In this collection, you'll create a simple game with React using Recoil, to explore how you can share and update state across an app.

    illustration for Manage React State with Recoil
    Yoni Weisbrod ・24m・Course

    Start with the basics of state management and dive further into the selector API, as well as learning different strategies for handling synchronous and asynchronous Selectors

    illustration for React State Management Expert Interviews
    Joel Hooks ・7h 49m・Podcast

    This is a series of videos where you'll find part interview and part screen share with experts. They focus on React, but the underlying principles are valid for UI work in general.