3 ms·
Wouldn't that be an example of the exact reason to use React in dev and Preact in production, as OP said? PropTypes are useless in production.
by SamBam 10y ago
Wouldn't that be an example of the exact reason to use React in dev and Preact in production, as OP said? PropTypes are useless in production.
- untog 10y agoYeah, it was a bad example. A better one: Preact lets you specify HTML classes using "class", React requires you to use "className". So it would be easy to trip up on that dev/prod difference. EDIT: damn it, that's a bad example as well, because it would work fine if you use React for dev (which takes className) and Preact for prod (which uses either). I still think it's a bad idea, though.
- mercer 10y agoConsidering these two bad examples (and another one in a parallel thread), I still don't really understand what the downside is...