I have found out about Preact just today. It looks very good, but I am concerned a lot about the lack of warnings that React usually produces that can save a lot of time and headaches when looking for a problem.
So that got me thinking if it would be actually viable to use React for developing app and just switch it for Preact (+ compat) in a production bundle. Obviously, it wouldn't be possible to use things that are only in Preact, but that's a low price for having easier developer experience.
Did anyone try this approach?
There are quite a few people using that approach, but I wouldn't recommend it. You should test the code you run in production, and swapping out the rendering library is a fairly major difference between dev and prod.
For warnings, we're about to release a debug plugin that adds much of what you're missing, you can see @NekR's lovely work on that in #633.
@FredyC Yeah, if you have any suggestions about warning/throwing errors in preact/debug -- please suggest!
Most helpful comment
There are quite a few people using that approach, but I wouldn't recommend it. You should test the code you run in production, and swapping out the rendering library is a fairly major difference between dev and prod.
For warnings, we're about to release a debug plugin that adds much of what you're missing, you can see @NekR's lovely work on that in #633.