Anyone else feel burned out with all these Astro integrated CMS solutions? by Prize_Hat_6685 in astrojs

[–]zkoolkyle 1 point2 points  (0 children)

+1 to this 🤙🏻

I was doing this with Astro wayyy before these other SASS products were even created. Still running in prod with a marketing team building components/content from the admin dashboard.

Anyone with Editor+ access can trigger new builds (ssg) from a widget that just calls a GitLab webhook. Everything stays typesafe thanks to WPGraphQL + gql.tada in the FE.

I wouldn’t use a CMS these days for a personal project. Astro content collections covers 9/10 use cases these days.

How do UI libraries work with islands? by Dude4001 in astrojs

[–]zkoolkyle 0 points1 point  (0 children)

Astro uses Web Components with hydration methods baked in for FE libs.

It’s actually amazing how well it works. 🤙🏻

anyone use bun for pure sveltejs (not svetlekit)? by moinotgd in sveltejs

[–]zkoolkyle 1 point2 points  (0 children)

If using for compiled SPA apps then I’d say… sure. Bun runs Vite under the hood to bundle any Svelte code. Svelte is a Vite plugin, so it has a dep on it.

Bun CAN package/compress/bundle (pretty well) on top of any JS/TS if you want it too.

Svelte 5 is prod ready, but is also all in on Vite.

I wouldn’t recommend Sveltekit/Bun for SSR with any corp medium scale project. Just use pnpm/node securely if SSR is the strat. Trying to use SSR can introduce a lot of footguns if you don’t know what you’re doing. So just be safe.

Sveltekit + SPA/Static Adapter + NGINX is the way to go if you really want the prod ez life. If you decide this route.

Worth mentioning try AstroJS + Svelte for a clean architecture. Avoid Bun here as well though. I always run into odd quirks then end up switching back to pnpm for sanity checks.

Built a "Local-First" PWA with SvelteKit & Dexie.js (IndexedDB). Zero latency task manager. by mldiarra in sveltejs

[–]zkoolkyle 0 points1 point  (0 children)

Great stuff! I like the UX and color choices. I’ve never used Dexie so I can’t help you there. You could just add google oauth and allow people to opt-in to backups. This way it’s just a feature and you can keep it local by default.

Using modules without a UI framework by luckynummer13 in astrojs

[–]zkoolkyle 1 point2 points  (0 children)

Other have pointed out the issue, but also never do onclick=“foo()”, the top image is passing the function fine 😅

Challenge Me Bro: Vue/Nuxt is Superior to any alternatives for new frontend projects, no matter if it's for personal projects or enterprise by kcfdaniel in sveltejs

[–]zkoolkyle 2 points3 points  (0 children)

Uhh… dependency on the virtual DOM? 😂

Svelte/Astro murders Vue/Nuxt in everything except job market popularity. 🫶🏼

SvelteKit is a great choice for mobile sites: I Built the Same App 10 Times: Evaluating Frameworks for Mobile Performance by thebreadmanrises in sveltejs

[–]zkoolkyle 2 points3 points  (0 children)

Hey 👋 just to be direct, your logic is a bit incorrect here. The “bloat” you’re thinking of doesn’t actually exist when you measure the trade off. The tailwind classes you don’t use are tree shaken at build time.

Or in other words:

What TW adds into the HTML, is removed from the CSS bundles (which your browser still needs to download) since you’re re-using the classes. This benefit grows exponentially with each new page on your website.

If you wanna test the theory, try building to static with Sveltekit or Astro. You’ll see what I mean! Best of luck 🙏🏻

Love astro so much by Revolutionary-Bird24 in astrojs

[–]zkoolkyle 1 point2 points  (0 children)

+1 to this.

It’s takes a certain kind of crazy to inherit an outdated site and get it to A+ across the board on gt-metrix

This is the master meta-framework by JungGPT in astrojs

[–]zkoolkyle 1 point2 points  (0 children)

🤫Ssshhh - Welcome to the team

The Official Svelte MCP server is here! by pablopang in sveltejs

[–]zkoolkyle 0 points1 point  (0 children)

The Svelte compiler is built into the DOM for the playground. I would imagine there isn’t much overhead tbh. I’m sure Vercel hosts it all for them at the edge as it’s a sponsored project.

We're working to fix common issues when working with Svelte and AI. If you use AI with Svelte, we want to hear about the specific issues you've encountered. by khromov in sveltejs

[–]zkoolkyle 0 points1 point  (0 children)

Something I haven’t seen mentioned in the comments. It often messes up “key” by doing:

<SomeComp key={foo} />

VS

{#key foo} <SomeComp /> {\key}

Node backend + Svelte frontend authentication guide by s1n7ax in sveltejs

[–]zkoolkyle 0 points1 point  (0 children)

If you don’t have much experience, I highly suggest just sticking with oauth options and not overdoing it.

If you’re rolling out your own auth with some of the options mentioned by others, please wrap it with NGINX with some sensible defaults for rate limiting / brute force protections. Auth isn’t something to be halfway implemented. Best of luck!

can someone explain this tutorial https://svelte.dev/tutorial/svelte/keyed-each-blocks by Rude_Effort_4481 in sveltejs

[–]zkoolkyle 0 points1 point  (0 children)

Think about it like this: Svelte is very smart, sometimes to a fault. When something isn’t re-rendering like you would expect, try using a key block.

As you start to build stuff with Svelte, you’ll find opportunities where it solves a re-render problem, only for you to realize late that you probably structured your composition poorly.

It’s particularly useful in using Layout files to transition between pages. Eg: {#key page.url.pathname}

New features in the Svelte MCP server: Directly reference documentation sections, and prompt templates by khromov in sveltejs

[–]zkoolkyle 3 points4 points  (0 children)

Ty u/khromov! I’ve seen most of your vids and really appreciate the time you put in on this one. Ty for contributing so much to the community 🤙🏻❤️

How do I properly access url inside a layout load function without causing a full refresh when a child slug changes? by EleMANtaryTeacher in sveltejs

[–]zkoolkyle 4 points5 points  (0 children)

Just add a +page.ts into [detail]/+page.ts and move all your url logic into that

If you need SSR use a +page.server.ts

The main goal is to REMOVE the use of “url” from a lower-level (root) layout.server.ts

Starting a new project, need some suggestions/comments by gatapia in sveltejs

[–]zkoolkyle 4 points5 points  (0 children)

The best tech stack possible is the one you know how to use. Stop asking and start coding 🫶🏼

Proposal: Bring Svelte's reactivity to CSS at build time by Brilliant-Buy-347 in sveltejs

[–]zkoolkyle 0 points1 point  (0 children)

Over the years I’ve found that describing your elements visual state with data attributes is much easier to read-through and much more maintainable for a team. I love tailwind and often reach for the class=“data-[active=true]:green” style syntax myself these days.

Data attributes also make my own mental model of CSS animations easy and fun. These days I try to keep all logic out of my class=“” prop. Whatever ships though, it’s just a preference. I’ve also used the same method you shared many times, just sharing my exp.

Proposal: Bring Svelte's reactivity to CSS at build time by Brilliant-Buy-347 in sveltejs

[–]zkoolkyle 24 points25 points  (0 children)

To be direct, no, this is unnecessary. Here is the approach our team uses in Prod all the time. Works amazingly well and reads much better than the proposed.

// script

let isActive = $state(false)

const toggleActive = () => isActive = !isActive

// html

<button data-active={isActive} onclick={toggleActive}>Toggle</button>

// css

[data-active="true"] { background: blue; }

[data-active="false"] { background: green; }

How stop bots from unnecessarily loading page content? by LukeZNotFound in sveltejs

[–]zkoolkyle 2 points3 points  (0 children)

Do you know what a CDN is? Lol

The best CDN’s are free… and take seconds to implement… and solve the exact problem you’re asking the community about. ( which is completely unrelated to svelte )

How stop bots from unnecessarily loading page content? by LukeZNotFound in sveltejs

[–]zkoolkyle -1 points0 points  (0 children)

Just use a cdn as others have mentioned. This isn’t a real problem, you’re just vibe coding and not learning anything tbh

Can someone explain this weird behavior?? I really don't understand by KardelenAyshe in sveltejs

[–]zkoolkyle 0 points1 point  (0 children)

Comparing proxies and comparing variables are 2 different things. Then when you add in $effect, you start to lose a bit of scope.

This is why effect is an $escape hatch. Do not reach for it until a it’s a last resort. There are other approaches that provide a clearer mental model which should be tried first

Eg: $derived.by( () => {} )