jamesplease / jamesplease/react-composer

Perfomance: unnecessary rerendering

Open
#63 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
607
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Hi. First of all thanks for your work!

But here's i investigate some perfomance issues. I'm currently using `why-did-you-render` lib and have some interesting warnings:

![2018-12-21 13 41 16](https://user-images.githubusercontent.com/16166451/50338705-3f46a000-0526-11e9-9bc6-0ae525eeb711.png)

(another 3 warns is the same)

I believe `react-composer` changing component's children more than 1 time so it's produces some unnecessary rendering. Here I have 4 rerenders due to `props.children` !== `prevProps.children`

Thanks.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported warnings with why-did-you-render and inspect how react-composer updates props.children. Use the linked warning image and the report of four rerenders as the baseline; done means the unnecessary children-driven rerenders are no longer observed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.