ml-in-barcelona / jsoo-react

js_of_ocaml bindings for ReactJS. Based on ReasonReact.
https://ml-in-barcelona.github.io/jsoo-react
MIT License
138 stars 19 forks source link

Set displayName in dev mode #79

Open jchavarri opened 2 years ago

jchavarri commented 2 years ago

It'd be nice to call displayName when using profile=dev mode in Dune, so that we can see nice component names in browser when using React extension.

Example: https://github.com/utkarshkukreti/reaml/blob/5640a36293ba2a765171225deddb644f4d6c5d26/src/Reaml_Core.ml#L248

davesnx commented 2 years ago

Plus one to this, using the React extension it might be a good idea to visualize the React Tree. Not useful to see the props, but at least is something!