3 ms·
yes but no one generates html from the function calls directly in react (even though you could if you wanted), they use jsx which is at least a bit like writing
by uhtred 3y ago
yes but no one generates html from the function calls directly in react (even though you could if you wanted), they use jsx which is at least a bit like writing html.
- neurostimulant 3y agoFirefox's Devtools uses React and it doesn't use JSX. Example: https://github.com/mozilla/gecko-dev/blob/aec3a901e6f6b3041b5ec457c9111a042cef1fb1/devtools/client/netmonitor/src/components/MonitorPanel.js#LL203C10-L203C10 https://github.com/mozilla/gecko-dev/blob/aec3a901e6f6b3041b... Their reasoning: https://firefox-source-docs.mozilla.org/devtools/frontend/react-guidelines.html#why-no-jsx https://firefox-source-docs.mozilla.org/devtools/frontend/re...
- acemarke 3y agoThat page is very out of date. They did later adopt a build step and switch to using JSX in much of the FF DevTools codebase. As an example, here's the Editor main component (same "latest" commit you pointed to): https://github.com/mozilla/gecko-dev/blob/aec3a901e6f6b3041b5ec457c9111a042cef1fb1/devtools/client/debugger/src/components/Editor/index.js#L686-L722 https://github.com/mozilla/gecko-dev/blob/aec3a901e6f6b3041b... The codebase is a mish-mash of very old-style React+Redux code, with newer files and usages. (I know this because I work at Replay.io, which started as a fork of the FF DevTools source, and we spent all of last year modernizing our fork :) Migrated the entire codebase to TS, ripped out all remaining uses of the ancient `React.DOM` helper functions and converted those to JSX, modernized the 2015-era Redux logic, etc: https://github.com/replayio/devtools/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Amerged+merged%3A2022-03-05..2022-11-30+ https://github.com/replayio/devtools/pulls?q=is%3Apr+sort%3A... )
- neurostimulant 3y agoYou're right, I totally missed they have tsconfig which include jsx preprocessor now. Too bad the devtools contributor documentation is not updated anymore, mozilla devs are probably stretched too thin to update obscure docs these days.