Emotion example is poorly performant, re-rendering over 50 times a second
See original GitHub issueWhat version of Remix are you using?
1.2.3
Steps to Reproduce
- Download the example app:
$ svn export https://github.com/remix-run/remix/tree/main/examples/emotion
- Install dependencies
- Log style re-render trigger:
$ vim app/entry.client.tsx # Add `console.log("🚨 RERENDER 🚨")` in `reset()` function body
- Run app:
$ npm run dev
- Look at the console:
This is not only re-applying the style tags, but also re-rendering the entire app tree over 50 times a second, which isn’t good at all. See my comment below for a suggestion on how to combat this problem.
Expected Behavior
A fast app
Actual Behavior
An app that is flooded with console warnings and re-renders
Issue Analytics
- State:
- Created 2 years ago
- Comments:30 (1 by maintainers)
Top Results From Across the Web
Just Say No to Excessive Re-Rendering in React - GrapeCity
In this article, we will address instances of excessive re-rendering in React applications and demonstrate how to avoid them.
Read more >When does React re-render components? - Felix Gerschau
React re-rendering explained and how to optimize React's re-render performance.
Read more >Untitled
The second user study investigates the emotional component and how it can be ... A large body of research on children's cognitive and...
Read more >David and Daniel discuss the Comet and Ajax implementation in Lift.
@djspiewak @dpp If there was a well-known method to xferring state b/n client and ... Let's look at another example more obvious in...
Read more >Luke v. State, Court of Appeals Case No. 19A-CR-2229 | Casetext ...
On appeal, Luke contends that the trial court should have excluded testimony from the State's handwriting and fingerprint examiners, as well as State's ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I plan on knocking this out today 🙂
I’ve been meaning to do this but it fell to the bottom of my to-do list. I’ll try to get back on it next week if no one else beats me to it 😅