why-did-you-render
nextjs-rewrite-test
why-did-you-render | nextjs-rewrite-test | |
---|---|---|
50 | 1 | |
11,753 | 0 | |
1.9% | - | |
8.1 | 0.0 | |
23 days ago | almost 4 years ago | |
JavaScript | JavaScript | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
why-did-you-render
-
The React Performance Rabbit Hole I Fell Into (And How I Climbed Out)
Track rerenders of specific components with Why did you render?
-
React Component Libraries: Overview of 19 Top Libs
Why-Did-You-Render Documentation
-
How to track React re-renders - why-did-you-render issues
Yet - its codesanbox examples target React 16. I tried to upgrade its codesandbox examples to React 18. They run as React applications, but no wdyr concole reports are generated. There are some issues that reports this problem, e.g. https://github.com/welldone-software/why-did-you-render/issues/294 but generally the activity is almost nonexistant. Stackoveflow threads has only severl questions about wdyr.
- Too many rerenders in react?
- Lag issues with RN
- After a year developing with react, I think I've been doing all wrong
- How can I stop a component from reloading all the time?.
-
How to speed up React Native screen when full of TextInput?
Check out why-did-you-render. It may tell you some more information.
-
Why and How We Retired Elm at Culture Amp
It's a combination of many things, but imo one of the worst is all the footguns regarding state and the rerenders they cause
https://emnudge.dev/blog/react-hostage
It's so easy, that we monkey patch react to debug it https://github.com/welldone-software/why-did-you-render
Plus the vdom... Isn't great, the bundle size puts react at an inherit disadvantage, and the community has a knack for over reliance on bloated packages
-
7 Proven Practices to Boost Development Speed and Project Quality
When we implemented the MVP of the fintech app, we had a quite complicated form. At that time, I was still young and inexperienced. And eventually, we realized that our project was slowing down. We had to spend additional hours figuring out the reason. We had many unnecessary re-renders because we ignored basic rules related to props in React. I wanted to do everything possible to avoid such situations in the future. So, I added to the project linters like this and an additional starting configuration to package.json to run why-did-you-render. In short, this plugin issues a warning if something is re-rendered unnecessarily and suggests how to avoid it. Also, we included running Lighthouse in headless mode. Some people say that premature optimizations are bad, but for me, it's a principle: do it right from the start.
nextjs-rewrite-test
-
Rewrites and _app rendering twice on load
I noticed while looking at the profiler the other day that all of our pages were rendering twice on initial load. Then saw that _app component was doing the same. Going backwards, I saw that rewrites in config were causing this. I was able to observe the same behavior on a brand new project, https://github.com/ardaerzin/nextjs-rewrite-test, I created with npx create-next-app. The moment I add rewrites, _app starts rendering twice.
What are some alternatives?
use-what-changed - A React hook and an easy to use babel-pugin to debug various React official hooks
MineRender - Quick, Easy, Interactive 3D/2D Renders of Minecraft
react-render-tracker - React render tracker – a tool to discover performance issues related to unintentional re-renders and unmounts
RunJS - RunJS is a JavaScript playground for macOS, Windows and Linux. Write code with instant feedback and access to Node.js and browser APIs.
craco - Create React App Configuration Override, an easy and comprehensible configuration layer for Create React App.