Giter VIP home page Giter VIP logo

react-optimizations's Introduction

Summary

Check out the demo

This repository hosts the code for a video series on optimizing react applications.

In this series we walk through:

  • Hooking up the app to local state using useReducer
  • Using React.memo to avoid extra re-renders
  • Implementing immer to make our code more readable and avoid completely rewriting the entire state
  • Hoisting state into a context to avoid prop-drilling and separate the dispatch from the state
  • Adding recoil to separate our state tree from our view tree and subscribe only to the necessary components

Disclaimer

This is only a demo. The application in this repository is not meant to reflect the complexity of an actual application. It is written is such a way to highlight specific performance bottlenecks developers might encounter using React, and propose different solutions to those problems.

As with every tutorial, blog, or video series, take every suggestion with a grain of salt, try out the techniques demonstrated, and learn not only how to apply these lessons, but also when to.

Outline

The following is the outline of topics with the corresponding video and branch

History of this repository

This is the repository for a video series I'm working on showing different optimization strategies in React

This is a fork of another repository I used for a demo of the library immer at Austin Downtown React Meetup for the August, 2019 meetup.

You can view the original repo here

Bootstraped with create-react-app

Questions?

If you have any questions, suggestions, or edits, feel free to reach out to me on twitter, or just leave an issue in this repo.

react-optimizations's People

Contributors

brookslybrand avatar

Stargazers

Xeanorm avatar Frazier Mork avatar John Johnson avatar Sibelius Seraphini avatar Jonas avatar Zaydek MG avatar

Watchers

James Cloos avatar  avatar

Forkers

dskelton-r7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.