facebook / react

The library for web and native user interfaces.
https://react.dev
MIT License
227.56k stars 46.42k forks source link

DevTools React recommendations UI / architecture #21287

Open bvaughn opened 3 years ago

bvaughn commented 3 years ago

Up until this point, DevTools has generally presented information without making specific recommendations. For example, the Profiler shows which components are faster or slower, relative to each other, but makes no recommendations about how slow is too slow or when/where memoization should be added.

Some overall architecture and UX for this would probably be good to consider adding to DevTools.

Ideas for things DevTools might warn about:

Perhaps we could add an audit mode to check a specific component (or the whole tree) for problems like the ones above.

tylerkneidl commented 3 years ago

This is an amazing idea, I'm just trying to think of some more concepts that could be tested here. How would one even make the decision around how slow is too slow? Would we need to conduct research? Compare it to other components of similar types? Suggest when to use context and reducers? Really fun to think about!