thiagolino8.bsky.social
Full-Stack Dev 💻 | Tech enthusiast 🚀 | Curious mind 💡
Exploring innovation, digital culture, and the future of tech 🌐
Here to connect, learn, and share insights ✨
https://www.linkedin.com/in/thiago-lino-gomes-5812581bb
https://github.com/thiagolino8
134 posts
24 followers
68 following
Regular Contributor
Active Commenter
comment in response to
post
This should be incorporated into sveltekit ASAP
comment in response to
post
If React is like "cars," then frameworks such as Vue and Svelte are like "bikes." I live in the Netherlands, where people generally prefer and use bikes over cars.
I love bikes.
comment in response to
post
Another thing I didn't find in the documentation, does the router have the concept of optional parameters?
Without using a splat I mean
comment in response to
post
The examples are not available on the docs site via search or sidebar
Thanks
comment in response to
post
Yes
comment in response to
post
And there's also the fact that for a long time useEffect was the only way to do a lot of things
It's only more recently that other APIs have arrived to ease the burden
comment in response to
post
It's no accident that the design of the effect APIs in other frameworks is very similar, but it doesn't cause 1% of the headache.
comment in response to
post
Spicy take: useEffect is ok, even with the dependency array
The real problem is the rerendering model
Having to understand when useEffect is executed in relation to it, having to worry about reference stability, thaving to worry about trigger new renderings
comment in response to
post
Spoiler: your problem is the re-render model
It's always the re-render model
Try something without it
I recommend Svelte
comment in response to
post
Me lembrou esse
youtu.be/mnyxw8MdpQQ
comment in response to
post
To be fair entry transitions were always the easy part
The big difference with Svelte is the APIs for exit transitions and for reversible entry and exit
Besides transitions that actually need js
comment in response to
post
I bet not much code is commited to github with $inspect
comment in response to
post
You can infer the type but not tree shake
At least I can't see how
comment in response to
post
comment in response to
post
Final version, you can choose between inline svg and img
comment in response to
post
Oops, the css was wrong
comment in response to
post
And if you remove the eager parameter you can use dynamic imports to avoid importing all the svgs when you only want one
comment in response to
post
What I usually do is use import.meta.glob + '?raw' query + {@html}
This way each svg is in its own file and there is no need to add a new export every time
I believe hydration is also simpler using {@html} (not sure)
comment in response to
post
And if it is not possible to use the simple state primitive for this purpose, perhaps encouraging the use of writable derivatives for non-computed data would be enough
Or creating a new primitive for simple lazy state
comment in response to
post
Those that use signals support Suspense (or have the ability to support it)
And they also have primitives for asynchronous data and lazy computed data
It's not the same thing as primitives for concurrent rendering, but I believe they can be used to implement declarative ViewTransitions
comment in response to
post
I'm not sure if this is what you meant, but the closest thing I could think of was Svelte's createSubscriber function.
You tell the constructor when it should trigger a reaction, and it returns a signal to be read where you want a reaction to occur
svelte.dev/docs/svelte/...
comment in response to
post
Well, the biggest difference between signals and common observables is that subscription occurs during reading, so it makes sense that most implementations wrap the value in the signal.
comment in response to
post
But I changed the repl to remove the warnings anyway
comment in response to
post
Well, they are just warnings, not errors.
Their purpose is to warn about some behavior that is probably not desired, in this case it is.
The warnings are not relevant in this case
comment in response to
post
Effects are often necessary for asynchronous operations for many reasons, especially cleanup
But for the case you exemplified $derived seems to be enough
svelte.dev/playground/9...
comment in response to
post
But it was also the only way to do the work that is now done by:
useSyncExternalStore
useOptimistic
callback refs with cleanup
useDeferedValue
use
All added in the last 2 versions
Before that there was only useEffect
comment in response to
post
Svelte had an equivalent of createSelector in early alphas, not sure why it was removed
@rich-harris.dev , do you mind telling why it was removed?
comment in response to
post
Additions like createSubscriber and mutable derived have eliminated many of the usages that required $effect
The only thing missing to eliminate $effect for good now is a primitive to handle asynchronous state atomically
comment in response to
post
use effect gets a lot of hate, but the truth is that for a long time React didn't have the APIs needed to handle many issues, especially external state
That's why useEffect was the tool to solve everything (in a poor way)
comment in response to
post
To this day there has not been a single occasion where I have gone into the Qwik documentation and something was not broken
And I gave it MANY chances
comment in response to
post
Only thing worse than that are places that used to be links have been changed to buttons
I was recently bothered by one of these on YouTube
comment in response to
post
Time to cleanup your tabs
comment in response to
post
Wouldn't this be a good opportunity to make the same move as nuxt and get out of acorn once and for all?
github.com/nuxt/nuxt/pu...
comment in response to
post
esbuild is not required for rollup, but both rollup and esbuild are required for vite
comment in response to
post
It's really strange that a library that doesn't have an official framework is so afraid to recommend the main way of creating apps nowadays
Meanwhile, even libraries that have an official framework are still strongly recommending Vite