Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Flatten function performance issue v4 #2424
Having recently tried to upgrade our styled-components from v3 to v4 in a relatively large react app - we've ran into a strange performance issue that seems to be tied to the flatten function. When commenting out this part of flatten, the issue seems to resolve:
Here are screenshots of performance snapshots run with chrome dev tools when performing the same action in our app on v3 vs. v4:
Strangely, we have not been able to reproduce this in a clean slate react app.
Unable to reproduce with a basic react app created via
Performance is as good if not better than v3.
Performance is sluggish, significantly slower than v3.