3 ms·
Could anyone with experience porting from one to the other let us know how it went?
by WalterSear 9y ago
Could anyone with experience porting from one to the other let us know how it went?
- gedy 9y agoFor many codebases, Preact can be use simple as: npm i -S preact preact-compat then add this to webpack config: { "resolve": { "alias": { "react": "preact-compat", "react-dom": "preact-compat" } } } https://preactjs.com/guide/switching-to-preact https://preactjs.com/guide/switching-to-preact
- bpicolo 9y agoThe tricky part is probably testing. I don't think e.g. jest (or maybe it was enzyme?) supports alternative implementations quite yet, though they were working on it...that was true months ago though. If you're starting from scratch pretty easy though, sure. But that assumption is all too widespread in the JS ecosystem these days : (
- gedy 9y agoWe saw no problems with Mocha & Enzyme, can't comment on Jest.
- WalterSear 9y agowoot. brb :)