Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why react dev tools Profiler dont show me component props?

I start to learn optimization of React. And see some learning resources, and on them, I can see component props in the Profiler. But in my Profiler, I don't see any props. Why?

And how can I see a current render component props in Profiler?

A make screenshots to show this: enter image description here

like image 813
Konstantin Pershin Avatar asked Apr 09 '20 12:04

Konstantin Pershin


1 Answers

The Legacy DevTools extension added a significant performance overhead and would be become unusable in large apps. The new DevTools improved by minimizing communication between the front end(the extension you see: Component, Profiler) and back end, which render component information only when needed.

The Props changed in the Profiler is still there, however it's not as detailed. It lacks displaying names of custom Hooks. It does show prop names but only the ones that changed and doesn't show their values. enter image description here

The Changelog unfortunately doesn't explicitly list that it dropped support to display prop values and should've been more clear on that.

like image 196
Caleb Taylor Avatar answered Nov 15 '22 23:11

Caleb Taylor