Hakan
Internally, React uses several clever techniques to minimize the number of costly DOM operations required to update the UI. While this will lead to a faster user interface without specifically optimizing for performance for many cases, there are ways where you can still speed up your React application.
Users enjoy fast and responsive user interfaces (UI). A UI response delay of fewer than 100 milliseconds feels instant to the user but a delay between 100 and 300 milliseconds is already perceptible.
To improve user interface performance, React offers a higher-order component React.memo(). When React.memo() wraps a component, React memoizes the rendered output of the wrapped component then skips unnecessary renderings.
This post describes the situations when React.memo() improves the performance, and, not less important, warns when its usage is useless.
When deciding to update DOM, React first renders your component, then compares the result with the previous render. If the render results are different, React updates the DOM.
Current vs previous render results comparison is fast. But you can speed up the process under some circumstances.
When a component is wrapped in React.memo(), React renders the component and memoizes the result. Before the next render, if the new props are the same, React reuses the memoized result skipping the next rendering.
JS developer.