Svelte + SvelteKit

527 readers
1 users here now

Svelte is a JavaScript framework for building user interfaces (UIs) that compiles your code into efficient JavaScript during the build process, resulting in better performance and smaller bundle sizes. Svelte focuses on reactive programming, where UI components update themselves when data changes, eliminating the need for a virtual DOM. Svelte Kit is an extension of Svelte that adds features like routing and server-side rendering, simplifying the creation of full-stack web applications. It provides file-based routing and supports server-side rendering, enabling faster initial page loads and improved search engine optimization. Svelte Kit combines client-side Svelte components with server-side rendering and serverless functions for a seamless development experience.

founded 1 year ago
MODERATORS
1
 
 

Oh, so @sveltejs 5 is live now!! Wow! Congrats to @rich_harris and contributors!! https://svelte.dev/

2
 
 

We're thrilled to have you here as we embark on this exciting journey together. As you may already know, our community was created as an alternative to the Reddit subreddit r/sveltejs, recognising the need for a reliable and secure platform to connect and share ideas.

With Reddit's uncertain future, it's important for us to establish a vibrant and inclusive community where Svelte enthusiasts, like yourself, can engage, collaborate, and learn from one another. Whether you're a seasoned Svelte developer or just staring out with SvelteKit, this community is here to support and uplift everyone.

Here are a few ways you can make the most of your experience here:

1️⃣ Introduce Yourself: We encourage all new members to introduce themselves to the community. Tell us a bit about your background, your passion for Svelre/SvelteKit, and what you hope to gain from being part of this community. We're all ears and excited to get to know you!

2️⃣ Share Your Projects: If you've been working on a cool Svelte/SvelteKit project, don't hesitate to share it with the community. We love seeing the innovative solutions and creative applications that Svelte developers come up with. Your projects can serve as inspiration and spark meaningful discussions.

3️⃣ Ask Questions: Need help with a coding challenge? Facing a roadblock in your Svelte/SvelteKit project? Don't hesitate to ask questions! Our community is full of experienced developers who are more than willing to lend a hand and share their expertise. We believe in fostering a supportive environment where everyone can grow together.

4️⃣ Contribute to Discussions: Engage with existing posts and discussions. Share your thoughts, provide insights, or even challenge ideas respectfully. By actively participating in the conversations, you'll not only build relationships but also contribute to the collective knowledge of the community.

5️⃣ Spread the Word: If you find value in this community, help us grow by spreading the word. Let your fellow Svelte/SvelteKit developers know about this alternative platform and invite them to join us. Together, we can create a vibrant and thriving community that benefits all.

Remember, this community is what we make of it. Let's come together to create a safe, inclusive, and supportive space for Svelte/SvelteKit developers to connect, learn, and inspire each other. Your contributions matter, so don't be shy—start posting, sharing, and interacting with your fellow developers.

We're excited to have you on board. If you have any questions or need assistance, feel free to reach out to our friendly moderators or fellow community members.

Happy Svelting! 🚀

3
10
Introducing Svelte 5 (frontendmasters.com)
submitted 3 months ago by mac to c/sveltejs
4
 
 

ShifterMesh with @CristianVogel ! Deep into ancient trees *and* frequency shifter networks *and* DSP coding for the web (including #typescript @sveltejs @threlte ) and - making some wild sounds while you're at it. https://cdm.link/2024/07/inside-cristian-vogel-nel-shiftermesh/

5
 
 

This might be of particular interest to any @sveltejs fans 👀
https://mastodon.macstories.net/@johnvoorhees/112434501344349786

6
21
[Megathread] Svelte 5 (svelte-5-preview.vercel.app)
submitted 6 months ago by silas to c/sveltejs
 
 

Although it’s not released yet, here’s a link to the Svelte 5 online playground so you can get familiar with new features and syntax. Make sure to check out the documentation on that same site for more details.

If you didn’t know, you can also choose to use Svelte 5 when setting up a new svelte project using npm create svelte@latest.

Chat and ask any questions below!

7
8
9
 
 

I’m starting to fall in love with #svelte @sveltejs I finally have a change to work with Svelte within real production codebase and it's nothing but a pleasure. For a newbie with long React background this feels like - «OMG, it actually could be just that simple!»

It's still early days, and I'm only scratching the surface but so far it feels really good.

10
11
12
8
submitted 9 months ago* (last edited 9 months ago) by silas to c/sveltejs
 
 

Svelte stores can be a lot more than just writable, readable, and derived!

13
14
14
submitted 10 months ago by mac to c/sveltejs
15
16
17
18
 
 

Hey all!

Let’s chat about Svelte runes to be introduced in the upcoming Svelte 5 update. This is a fairly significant change to Svelte that can give more power and organized code but renders some familiar Svelte syntax useless. Here’s the announcement article for reference and a dev vlog with some of the team for further listening.

  • So far, do you like runes or do you hate them?
  • What are the pros and cons?
  • Do you have any experience with similar syntax in other frameworks or languages?
19
 
 

Title.

I'm going to use svelte and sveltekit. Most likely tailwind. Zod for validation.

Any tips and tricks/ideas, pits to watch for before I commit heavily into falling into them.

This project could potentially be in vue/react but in my opinion svelte is more appealing to me (specially because of stores)

20
 
 

Any thoughts?

21
 
 

Build a SvelteKit app with the new all-in-one toolkit that can replace NodeJS. Anyone have any experience with it so far?

22
23
 
 

According to the Bun blog and changelog, Bun now supports SvelteKit! Bun is an incredibly fast JavaScript runtime, bundler, transpiler, and package manager — all in one. Similar to using npm, here’s how you can start a SvelteKit project with Bun:

$ bunx create-svelte my-app
24
25
 
 

I'm experienced with React and was just trying out a small Svelte to-do list to get my feet wet with Svelte and see if it's something I'd like to suggest we try out at work.

However, there's one thing I wanted to clarify that wasn't immediately obvious from the documentation (and to just kickstart some discussion since this community is a little quiet).

In React, if I have a large file doing a good amount of logic, like in the to-list example where I have add logic, remove logic, and toggle logic, all of which can be complex in their own ways if you improve them enough, I am able to extract the logic out into it's own file by creating a custom hook. Like so

const useTodoList = () => {
  const [list, setList] = useState([]);

  const addItem = (taskName) => {
    // task creation logic
    setList(l => [...l, newTask]);
  }

  // logic for removeItem and toggleItem

  return { list, addItem, removeItem, toggleItem };
}

Then, I can bring that into my component file by simply doing const { ... } = useTodoList(); and everything should just work. What would the equivalent be in Svelte? It sounds like I would want to leverage the store concept, but that feels odd to me. I go from having pretty simple logic to having to add additional libraries to my logic. It's a lot of overhead for what should really be a pretty straightforward refactor in React.

Any insight you guys can give would be great! Additionally, I'd love to be able to move the style as well, but so far haven't found anything that would be suitable for that quite yet. Svelte seems pretty set on having one large file whenever possible.

view more: next ›