Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ryanccollins/memoization-workshop

Memoization sample code for a workshop
https://github.com/ryanccollins/memoization-workshop

memoization react

Last synced: about 2 months ago
JSON representation

Memoization sample code for a workshop

Awesome Lists containing this project

README

        

# Memoization Workshop
This code base offers as an example to learn more about React's memoization tools & APIs and was written to accompany [this article](https://medium.com/p/6ac93c00418c).

## Getting Started
1. Clone the repo
1. Run `yarn` to install the dependencies
1. Run `yarn start` to start the development server.
1. Install the React Devtools browser plugin in your main browser.
1. Enable "Highlight updates on re-renders". See: this document for instructions.
1. Edit a catch phrase on a brokerage card with memoization disabled, notice how slow it is!
1. Edit a catch phrase on a brokerage card with memoization enabled and notice the difference in performance.
1. Open your console to see the `Profiler` data. Play around with the code by adding and removing `useCallbacks`, `useMemo` and `React.memo` to see how it affects the rendering performance.