-
Couldn't load subscription status.
- Fork 180
Closed
Description
I have noticed that there are many places* where bind is used in render method, creating a new function on every invocation. This results in unnecessary memory pollution and re-renders, as a result affecting performance.
A proper approach would be to either:
- Use class property syntax with Babel, or
- Bind every method once in constructor
* few examples:
- https://github.com/allegro/turnilo/blob/master/src/client/views/cube-view/cube-view.tsx#L367
- https://github.com/allegro/turnilo/blob/master/src/client/views/home-view/home-header-bar/home-header-bar.tsx#L68
- https://github.com/allegro/turnilo/blob/master/src/client/components/clearable-input/clearable-input.tsx#L64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels