Demo of shouldComponentUpdate and Immutable.js with React.
JavaScript Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
build Fix render log. Sep 22, 2015
specs Initialize from react flux boilerplate. Sep 18, 2015
.gitignore Link to app.js in readme. Sep 22, 2015

React and Immutable.js example

This application demonstrates how React always does a full re-render by default, and how you can change that behavior using shouldComponentUpdate and Immutable.js.

The application code is in the App.js file.

Get started:

Based on Flux React Boilerplate.


If shouldComponentUpdate isn't used all components are re-rendered every time any data changes.

Using shouldComponentUpdate means we only render a component if its data has changed. Using Immutable.js allows us to determine that by using a reference comparison between the old props and the new props, we don't need to do a deep comparison of objects.

This video shows what is re-rendered on each change.