Skip to content

An app to compare updating performance of React's Component and PureComponent

Notifications You must be signed in to change notification settings

jalooc/c-pc-perftest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project's goal is to compare updating performance of React's Component and PureComponent.

The app generates random tree of elements with maximum depth set by a user.

The dynamic nature of a React app is simulated by the following rules:

  • Every element has between 1 and MAX_CHILDREN_NUMBER children (except of the elements at maximum depth).
  • The number of children can change between rerenders.
  • Every element has a state that simulates a change in a prop: shouldChangeChildProp, which changes randomly, with the probability of being changed in inverse proportion to the depth it is located in the tree. Also, once one element doesn't change this prop, neither do its children. This is to simulate natural prop change flow in contrast to just randomly pop prop changes throughout all the tree.

About

An app to compare updating performance of React's Component and PureComponent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published