News for hackers. Stuff that matters.
Re:Thoughts on Svelte by h4ch1 on Monday March 27, 2023 @07:46AM (#35325438)
I've been building a medium-scale web application that works as a configurator for 3D models (swapping objects/changing materials) and parsing/storing/syncing those configurations in real-time along with images, and a lot of metadata that needs real-time updates. To be honest, it's a breeze until it's not, my single file gets very long, lots of declarations, $: reactive = another reactive variable, derived stores, the dependency graph can get really deep really quickly and it's very important to maintain a sort of heading, and plan ahead, because you can really lose yourself building with Svelte because of how little boilerplate there is.

Even then, 100% recommend it, documentation, and existing issues are sometimes lacking and information is hard to come by, but the Discord is helpful, even though it takes a lot of searching their "forums". Have great hopes for its' future, and it's really fun to build tools in Svelte, I remember giving all my Network Security assignments (transposition cipher, DES/AES, KDC) a nice, clean reactive front-end showing intermediate states of the data being passed around even though a simple cpp file would've sufficed, just because of how fun it's to use Svelte.

Re:Thoughts on Svelte by vaughan on Monday March 27, 2023 @08:19AM (#35325705)
I wonder if this is a visualization problem. Imagine if you could see the dependency graph visually.
Re:Thoughts on Svelte by jazzypants on Monday March 27, 2023 @10:35AM (#35327183)
In my opinion, this is yet another area where SolidJS is clearly the better option.

The dev tools give you a full visual reactive graph.

I like Svelte, but people like to pretend that it's easier than it is.

Re:Thoughts on Svelte by mekeor on Monday March 27, 2023 @10:45AM (#35327332)
which solid-dev-tool shows are graph?
Re:Thoughts on Svelte by jazzypants on Monday March 27, 2023 @10:49AM (#35327401)
I wasn't aware there were multiple. This one has Ryan Carniato's seal of approval. He talks about it on stream often.

Here you go: https://github.com/thetarnav/solid-devtools

Re:Thoughts on Svelte by h4ch1 on Monday March 27, 2023 @10:47AM (#35327372)
I think this is what you're talking about ? https://chrome.google.com/webstore/detail/solid-devtools/kmc...
Re:Thoughts on Svelte by jazzypants on Monday March 27, 2023 @10:51AM (#35327433)
Yep, that's it. It's in early development, and you have to install an additional library. But, it works wonderfully.
Re:Thoughts on Svelte by dmix on Monday March 27, 2023 @11:56AM (#35328303)
Is there something similar for Vue?
Re:Thoughts on Svelte by rk06 on Monday March 27, 2023 @02:04PM (#35330073)
I don’t think vue devtools have this capability. But if you are facing issues with large Vue components, then you should split it into smaller components. And use composables(vue hooks) to split js logic. That will get you quite far
Re:Thoughts on Svelte by vaughan on Monday March 27, 2023 @12:52PM (#35329034)
> full visual reactive graph

Is there actually a graph view? Or is it only the graph as a tree? I couldn't see it in the demo.

Re:Thoughts on Svelte by marcelr on Monday March 27, 2023 @09:05AM (#35326177)
I wouldnt say this is a problem unique to svelte

Ive designed svg based editor systems in svelte & the crucial piece was xstate.

I had editors with 7+ states, that is copy line, edit point of line, split line, draw line, etc.. and with xstate, no matter how much i added features each file would be 25-50 lines with some outliers at 80.

Id highly recommend it.

Re:Thoughts on Svelte by h4ch1 on Monday March 27, 2023 @09:30AM (#35326457)
Xstate looks very interesting, certainly going to take a look, thanks!
Re:Thoughts on Svelte by dsego on Monday March 27, 2023 @09:50AM (#35326661)
Is xstate something like redux or mobx?
Re:Thoughts on Svelte by phpnode on Monday March 27, 2023 @11:34AM (#35328040)
it's like a much more structured, and observable version of redux. observable in the sense that not only can you tell what has happened, you can also tell (and visualise) what can happen next
Re:Thoughts on Svelte by johtso on Monday March 27, 2023 @01:14PM (#35329369)
Yeah, the first time you realise you can set the disabled state of a button using `state.can('submit')` it feels like magic!
Re:Thoughts on Svelte by can_center_divs on Wednesday March 29, 2023 @01:37AM (#35353069)
Maybe your case is different, as your app is solving a completely different problem. We have been building a somewhat complex CMS system with Svelte the last two years and haven't had any issues, that couldn't be solved because of the lack of information you are mentioning.

After this time, literally every other framework seems unnecessarily overcomplicated for me lol. It is a BREEZE compared to writing React imo.