4 ms·
I'd be extremely dubious of this approach, as I've been burnt before by switching things between dev and prod (like using SQLite in dev, Postgres in prod). For
by untog 10y ago
I'd be extremely dubious of this approach, as I've been burnt before by switching things between dev and prod (like using SQLite in dev, Postgres in prod).
For development, one thing that immediately comes to mind is that React has PropTypes, which help to enforce types being passed from component to component. Preact doesn't have that.
- SamBam 10y agoWouldn'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...