git clone [email protected]:cvazac/test-ref-pattern.git
cd test-ref-pattern
npm install
npm startExplore to the codesandbox.io workspace.
npm install
npm start
Manually edit PatternComponent component and explore to http://localhost:3000/.
The render() method of PatternComponent must include <ChildComponent/> in its return value.
You will see that the following snippet forces a needless re-render of ChildComponent.
<ChildComponent prop={{}} />In the following snippet, we refactor to prevent the needless re-render:
<ChildComponent prop={static_empty_object} />