Earlier quoted context omitted.
But I wish new frameworks stayed away from inventing new language syntax. Not only is it a cognitive burden on programmers, it throws all the tooling off. From Svelte: {#each cats as { id, name }, i} JavaScript already has facility for loops and mapping, and relying on that will automatically get you tooling/IDE support. React handles this aspect quite well, and to me that's a point in favor of React. I do agree with…
I agree that gratuitous syntax differences are tiring, but in this case, there's actually a very good reason why it's not just using JS. When it comes to reactive systems, you need to be able to statically analyze control flow structures in order to compile to efficient code. In JS, a for loop is a loop, but so is array.map, Object.keys and someLib.each. The loop could be hidden three layers deep in a higher-order fu…
Comparing Svelte and React
271–280 of 338 posts
Re: Comparing Svelte and React
#272Earlier quoted context omitted.
The very important difference is that we do distributed systems now (admitted, X originally was also distributed, but only the drawing/events parts, not on the data level). A SPA is a distributed system, with all its drawbacks & pitfalls. If you ever did VB development in the 90s, you will know how easy it was to get a basic app running with those fancy Drag'n'Drop RAD tools. But there was no networking, everything w…
There absolutely was a remote part to most VB6 apps. Usually they fetched data from some MS flavour of a RDBMS. Of course they were desktop apps and had to be installed individually but this “webify everything” mania seems to have smothered all dev productivity and experience on its altar.
Re: Comparing Svelte and React
#273Earlier quoted context omitted.
Redux Toolkit is great and removes most of the usual Redux boilerplate which seems to be the most often used argument against Redux. Additionally, I usually use a function which uses createEntityAdapter, createSlice and createAsyncThunk methods to create Ducks bundles for each REST API resource automatically. As a result I get all async action creators, reducers and basic selectors for some REST API resource with a c…
If you like the stuff in RTK so far, I think you're going to like our upcoming "RTK Query" API, which adds a React Query-inspired data fetching abstraction: https://rtk-query-docs.netlify.app We're working on finalizing that API and will be merging the functionality and docs back into RTK itself for an upcoming RTK release: https://github.com/rtk-incubator/rtk-query/issues/175
Re: Comparing Svelte and React
#274I really do not understand the appeal of Svelte, it seems to be making all the same horrendous mistakes as Vue (bad templating/DSL that shoehorns control flow and bindings into DOM representation, esoteric lifecycle hooks etc) and the only advantage it clearly has over other frameworks that I can see is simple components can generally be written more concisely. Are there actually any tangible benefits to using it ove…
- Smaller code size. No loading of general runtime library, and I've heard people argue that each component(or page) has its own runtime (I may be wrong in the details)
- Many common tools are built-in, like stores and animations, and since there's no general runtime, if you don't use a particular tool, it doesn't get included
- For beginners, the tutorial is a blessing, they can pick up the framework while learning Js on-the-fly (I'm doing this with my nephew)
Re: Comparing Svelte and React
#275Earlier quoted context omitted.
So what. I've been a backend dev before I turned to front-end and web stuff. React has like a dozen top level functions and approaches. No backend project I have ever seen was this simple to program. How much more simple does it have to get before people stop complaining?
No-Code is what they look for :)
Re: Comparing Svelte and React
#276I wrote my first decent size Svelte app (with a Rails API app backend) last year: https://www.listenaddict.com/ Of course, what you see is just a tip of the iceberg, having implemented a nice admin and moderator dashboard, keyboard shortcuts, animations, 12 different color themes (in light and dark mode), and more. Svelte just made it all so easy to do. Having done a good bit of React and Angular professionally, and…
The one issue I had with Svelte was Sapper - I didn't get on with it (it wasn't a good fit for either of my projects). SvelteKit was released in beta a couple of days ago - I've no idea how much that changes things. I'm hoping I don't have to relearn a whole bunch of stuff to use the new shiny.
[1] - https://rikverse2020.rikweb.org.uk/ (Warning: Poetry!) [2] - https://scrawl-v8.rikweb.org.uk/ - I was quite proud about getting my canvas library to play nicely with Svelte
Re: Comparing Svelte and React
#277I wrote my first decent size Svelte app (with a Rails API app backend) last year: https://www.listenaddict.com/ Of course, what you see is just a tip of the iceberg, having implemented a nice admin and moderator dashboard, keyboard shortcuts, animations, 12 different color themes (in light and dark mode), and more. Svelte just made it all so easy to do. Having done a good bit of React and Angular professionally, and…
Your site is brilliant and works really well. I’m also going to check out your YouTube channel.
Re: Comparing Svelte and React
#278I wrote my first decent size Svelte app (with a Rails API app backend) last year: https://www.listenaddict.com/ Of course, what you see is just a tip of the iceberg, having implemented a nice admin and moderator dashboard, keyboard shortcuts, animations, 12 different color themes (in light and dark mode), and more. Svelte just made it all so easy to do. Having done a good bit of React and Angular professionally, and…
Same here. I've used Svelte on two reasonably hefty personal project sites[1][2] and was pleasantly surprised by how easy they were to build and (now) maintain. The one issue I had with Svelte was Sapper - I didn't get on with it (it wasn't a good fit for either of my projects). SvelteKit was released in beta a couple of days ago - I've no idea how much that changes things. I'm hoping I don't have to relearn a whole…
I plan on migrating to SvelteKit once it's stable, and may start migrating some of my smaller sites over in the meantime.
Also, no need to warn about poetry- more people should write from their heart IMO.
Re: Comparing Svelte and React
#279Re: Comparing Svelte and React
#280Earlier quoted context omitted.
React, Redux, Jest, and it’s ilk always came off to me as a way for Facebook to remain relevant through tech-debt and lock-in.
FWIW, Redux has _never_ been a Facebook project. Yes, both of the creators now work on the React team (Dan Abramov and Andrew Clark), but it's always been an independent OSS project, and is currently maintained by myself and Tim Dorr. As far as I know, FB barely even uses Redux at all internally, and that only in isolated particular teams that chose it themselves. My understanding is that they mostly use Relay for th…
The source I have says that Dan Abramov created Redux while working at Facebook on React[0]. So while Redux has never been under the official governance of FB, it was created by FB employees for a FB project (React) while in parallel working on that project.
[0] https://golden.com/wiki/Dan_Abramov_(software_engineer)-99B8...