Skip to content
JS

Optimistic UI Updates in React

Course on egghead by Erik Aybar

View on egghead (opens in a new tab)
25 min
LengthVideo runtime
Subscription
Price modelegghead plan
12
Lessons
4.9
Rating out of 56 ratings on egghead
Mar 2018
Published29 Mar 2018

About this course

Description from egghead

No matter what type of app you’re building, you're going to need to fetch data, display it to a user, and enable the user to interact with and update that data. This interaction and updating phase is often asynchronous by nature which presents you, the developer, an opportunity to provide a range of different experiences depending on the scenario. In some instances, you can leverage what is known as optimistic UI updates for an improved, snappier user experience compared to a traditional “loading/waiting” experience. They aren’t suited for every use case, but selectively making use of optimistic UI updates throughout your application can have a significant impact on the quality of user experience for relatively little cost and complexity! In this course, we’ll walk through implementing optimistic UI updates in the real world example of liking and unliking a tweet.

What it covers

12 lessons
  1. 1Course Overview: Optimistic UI Updates in React
  2. 2Examine Real World Optimistic UI Updates
  3. 3Optimistically Update UI for a Snappier User Experience
  4. 4Optimistically Update Multiple Values in State Using React's setState
  5. 5Refactor Inlined React setState Function to a setState Updater Factory
  6. 6Revert State On Request Failure using React setState and Closures
  7. 7Prevent Doubly Updating and Reverting State in React
  8. 8Update state asynchronously in React using Promise and setState()
  9. 9Add a loading indicator to UI for request in progress using setState()
  10. 10Handle a rejected promise and display error to user using setState()
  11. 11Optimistic UI update in React using setState()
  12. 12Restore Target Items in React State for Improved Optimistic UI Updates

Similar React courses

  1. Build React Components from Streams with RxJS and Recompose

    egghead · John Lindquist · 11 lessons · Dec 2017

    25 minSubscription
    egghead11Dec 2017
  2. GraphQL Data in React with Apollo Client

    egghead · Nik Graf · 7 lessons · 4.2 from 28 ratings · Dec 2018

    23 minFree
    egghead74.2 (28)Dec 2018
  3. Shareable Custom Hooks in React

    egghead · Joe Previte · 8 lessons · 4.6 from 45 ratings · Oct 2019

    30 minSubscription
    egghead84.6 (45)Oct 2019
  4. Learn React Router v5

    Codecademy · 1 lessons · Jan 2023

    Beginner1 h
    Codecademy1Jan 2023
  5. Beginner1 h
    Codecademy2Oct 2022
  6. Beginner1 h
    Codecademy1Oct 2022
  7. Build Your First React Website

    Coursera · Harrison Kong · Jun 2020

    Intermediate1 h 30 min
    CourseraJun 2020
  8. Intermediate1 h 30 min
    CourseraSept 2020

A hyphen means the provider's catalogue does not state the value.

Same topic, nearest in length, up to three from any one provider.

Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.

    Compare