react-scan icon indicating copy to clipboard operation
react-scan copied to clipboard

More information on components

Open FleetAdmiralJakob opened this issue 1 year ago • 4 comments

I don't know if this is because I use React Compiler, but in the end, it doesn't matter, I guess: I don't know what to do with some components because the component names are just not enough information to identify where the problems lie. Maybe some library uses these names, but as I said, I don't know. In this case, it would be helpful to specify in the UI from which library the component is coming. Maybe also specify on what pages the components are being used. Just some information that would make it easier to find the problem. Screenshot 2024-12-13 alle 12 45 12 AM

FleetAdmiralJakob avatar Dec 12 '24 13:12 FleetAdmiralJakob

This is more of a result from minifying. Nothing we can do here. Almost all production websites would suffer on the same problem, the two solutions are:

  • providing source maps (which may or may not be a security risk to the website)
  • providing component names via displayName

lxsmnsyc avatar Dec 13 '24 04:12 lxsmnsyc

Can't you guys do the sourcemaps like Sentry? They directly upload them from the build (via Vercel etc.) and after the upload delete them.

FleetAdmiralJakob avatar Dec 13 '24 04:12 FleetAdmiralJakob

Are you using our build plugin (react-component-name)? This provides component names even when using something like a minifier/react compiler, but only for components defined in your project (one's in node_modules are not)

RobPruzan avatar Dec 20 '24 01:12 RobPruzan

Haven't added it yet (at the time when the issue was created) because my PR for adding this (https://github.com/FleetAdmiralJakob/chat-io/pull/830) is held back by https://github.com/aidenybai/react-scan/issues/113

FleetAdmiralJakob avatar Dec 25 '24 05:12 FleetAdmiralJakob

Image

This is awesome! Thank you so much!

FleetAdmiralJakob avatar Jan 25 '25 01:01 FleetAdmiralJakob