Closed tfromme closed 3 years ago
FYI @tfromme no need to convert to classes for this. Just export memo from react and wrap your export with it. This is the equivalent of declaring it as a pure component. It does the same shallow comparison of props to decide whether to re-render by default.
You can also provide a custom comparison function if you prefer.
This could potentially be superseded by a refactor that includes less centralized data on the client side, doing more server side processing. TBD
Migrating to ReactTable and memoizing all the data there is sufficient for this
Convert to Classes and implement
shouldComponentUpdate
on many components. See https://reactjs.org/docs/optimizing-performance.html The earlier this gets done, the easier it will be. This can also be done in many steps over time.