4 ms·
How does it compare with Preact? https://preactjs.com/ https://preactjs.com/ I tried Preact a few weeks ago and the examples all worked, which was nice. And
by chubot 6y ago
How does it compare with Preact?
https://preactjs.com/ https://preactjs.com/
I tried Preact a few weeks ago and the examples all worked, which was nice. And there's no build step -- you can develop with a CDN and hit F5. Big win IMO.
https://news.ycombinator.com/item?id=25391077 https://news.ycombinator.com/item?id=25391077
- chrisweekly 6y agoPreact is (or was at one time) a nearly-complete implementation of React's APIs -- meaning a virtual DOM, etc. Synergy takes its own approach, and uses Custom Elements (from the "Web Components" standard). Edit: and synergy is also optionally avlbl via CDN for the no-tooling approach you liked in your preact experiments.
- defx 6y agoPreact is a really great project! I contributed to this myself in a very small way last year to add support for customised built-in elements. I would definitely recommend Preact if you're a fan of React. Synergy is different in a few ways, for example it uses Custom Elements whereas Preact has its own component system just like React. Synergy also separates HTML and JS concerns more clearly, making it a little more like Vue in that respect. Preact and Synergy both share this ability to work "as is" directly from a CDN without any heavy toolchain.
- docuru 6y ago> And there's no build step -- you can develop with a CDN and hit F5 Same with React. There is a production CDN https://reactjs.org/docs/cdn-links.html https://reactjs.org/docs/cdn-links.html
- afavour 6y agoNot totally the same as React as you still need to transpile JSX in most scenarios. I suspect that’s what they’re getting at.
- docuru 6y agoAh, then it's similar to Vue (for that particular feature)
- tayo42 6y agoYou can write react without building or jsx, it's in their tutorial or getting started doc.
- afavour 6y agoThat's why I said "in most scenarios". Every React codebase I've ever worked in has used JSX.
- capableweb 6y agoJust because "Every React codebase I've ever worked in has used JSX" doesn't mean "you still need to transpile JSX in most scenarios". Of course, if you're serious about using React, doing the transpilation before pushing your code to the CDN probably makes the most sense, rather than doing the transpilation client-side or using vanilla JS. But just because it's common, doesn't mean you need to follow that way of doing things.
- afavour 6y agoYou just admitted that "it's common". That's another way of saying "in most scenarios". I don't know why you're splitting hairs like this.
- quaffapint 6y agoI'm using Preact now in building a widget to be used on third party sites. I didn't want the heft of react, but yet that is what I knew well. Enter Preact. It has been fantastic. I've basically used all my react knowledge without any of the weight of React. Kudos to the Preact team.
- developit 6y ago<3
- tekstar 6y agoI use Preact. I like it a lot. Started with pure ES6, Preact, and htm templates - no transpilation step! As the project got bigger I migrated to Typescript and start using it's built-in JSX compiler. Was a pretty easy step. My only package dependencies for a long time were preact and preact-router. Recently moved to webpack to support proper packaging of node modules when I moved from REST to GraphQL. But no babel, and it's been really nice to slowly increment the build complexity only when it's been needed.