TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

SvelteKit 1.0

919 点作者 theodorejb超过 2 年前

70 条评论

hu3超过 2 年前
This is how I move fast and break nothing. By having fullstack type-safety from database all the way to the frontend with auto-completion. My current stack:<p>+ SvelteKit (could be Next, Nuxt, Solid or any other TypeScript framework)<p>+ tRPC (typed calls between frontend and backend, <a href="https:&#x2F;&#x2F;trpc.io" rel="nofollow">https:&#x2F;&#x2F;trpc.io</a>)<p>+ trpc-sveltekit (glues SvelteKit and tRPC, <a href="https:&#x2F;&#x2F;github.com&#x2F;icflorescu&#x2F;trpc-sveltekit" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;icflorescu&#x2F;trpc-sveltekit</a>)<p>+ Prisma (ORM, <a href="https:&#x2F;&#x2F;www.prisma.io" rel="nofollow">https:&#x2F;&#x2F;www.prisma.io</a>)
评论 #33987796 未加载
评论 #33990399 未加载
评论 #33987492 未加载
评论 #33990227 未加载
评论 #33987311 未加载
评论 #33988199 未加载
评论 #33987866 未加载
评论 #33987545 未加载
评论 #33993369 未加载
评论 #33988102 未加载
评论 #33987157 未加载
评论 #33990274 未加载
评论 #33990271 未加载
评论 #33993027 未加载
评论 #33987407 未加载
评论 #33990756 未加载
评论 #33987636 未加载
评论 #33988327 未加载
bkeating超过 2 年前
There is so much &quot;let me just see if this works...&quot; <i>tap tapppy tap</i> .... &quot;no... NO WAY... OMG IT WORKED!&quot; with Svelte.<p>Very little surface area. It embraces your knowledge of plain ole CSS&#x2F;JS&#x2F;HTML and empowers you with reactivity and a means of if being able to add motion to your ui.<p>Newbs and Pros alike can build <i>fast</i> with it. That speed + reactivity allows your software to better keep up with your converstaions that make it all so. Thats insanely powerful.<p>It&#x27;s soooo good. Congratulations to Richard Harris and everyone on the Svelte&#x2F;SvelteKit Team! &lt;3
评论 #33987020 未加载
评论 #33987755 未加载
评论 #33987842 未加载
评论 #33987359 未加载
Tade0超过 2 年前
As someone who wrote his first lines of JS in 2001, working with Svelte feels a lot like the good old days of JS when front-end was simple.<p>To me the main selling point is that the stack trace is actually useful for a change - you especially can find in there the line which caused the re-render and subsequent error.<p>JS frameworks&#x2F;libraries by and large lost that feature a decade ago.
评论 #33997972 未加载
dang超过 2 年前
Related:<p><i>SvelteKit</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29902450" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29902450</a> - Jan 2022 (3 comments)<p><i>My Evaluation of SvelteKit for Full-Stack Web App Development</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29806385" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29806385</a> - Jan 2022 (125 comments)<p><i>SvelteKit Is in Public Beta</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26557886" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26557886</a> - March 2021 (114 comments)<p><i>What&#x27;s the Deal with SvelteKit?</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24996750" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24996750</a> - Nov 2020 (2 comments)
Ilasky超过 2 年前
Sveltekit has been an absolute DREAM to learn and use with my app! Been tracking their 1.0 progress closely and it&#x27;s been incredible.<p>Sveltekit + TailwindCSS + FastAPI has made it super easy to whip up functionality and have a fine-tuned approach as well.<p>As someone else said, the &quot;I CAN&#x27;T BELIEVE IT WAS THAT EASY&quot; is an ongoing sentiment whenever I use it.<p>Looking forward to seeing it grow and gain more popularity
评论 #33989745 未加载
评论 #33989291 未加载
SebastianKra超过 2 年前
While I like Svelte, I fear it looses some of the flexible API-building enabled by React.<p>Specifically: since it uses a templating system, you can&#x27;t pass around interface definitions easily:<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;sveltejs&#x2F;svelte&#x2F;issues&#x2F;3480" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sveltejs&#x2F;svelte&#x2F;issues&#x2F;3480</a> (no dynamic slots)<p>- <a href="https:&#x2F;&#x2F;github.com&#x2F;sveltejs&#x2F;svelte&#x2F;issues&#x2F;5381" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sveltejs&#x2F;svelte&#x2F;issues&#x2F;5381</a> (can&#x27;t wrap children)<p>You can always find workarounds for these cases, often using `&lt;svelte:component&gt;`, but React&#x27;s Javascript&#x2F;Typescript-centric design avoids such issues before they even occur. For instance, I can trivially define a tabbed interface by mixing strings, JSX, and components, without imposing any DOM-structure. The component that reads this definition can use it to build a tabbed-view on mobile, and a master-detail-view on desktop. It could even build a table of contents.<p>In the definition, I can still work mostly with strings, but fall back to JSX in the rare case where I do need some advanced formatting:<p><pre><code> const tabs = [ { name: &quot;Tab 1&quot;, icon: &lt;img ... &#x2F;&gt;, content: MainTab }, { name: &lt;&gt;Tab with &lt;b&gt;bold&lt;b&#x2F;&gt; text&lt;&#x2F;&gt;, icon: &lt;MyIconComponent ... &#x2F;&gt;, content: SecondTab }, ] </code></pre> Again, I like Svelte, but I&#x27;m not yet sure whether the better syntax is worth the reduced expressivity.
评论 #34025419 未加载
评论 #33991019 未加载
swyx超过 2 年前
congrats team!<p>the livestream and meta discussions around the launch are happening here <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=N4BRVkQVoMc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=N4BRVkQVoMc</a><p>theres a full in browser tutorial as well: <a href="https:&#x2F;&#x2F;learn.svelte.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;learn.svelte.dev&#x2F;</a><p>I&#x27;ve been keeping a reference implementation of a SvelteKit blog, inspired by @leerob&#x27;s nextjs site: <a href="https:&#x2F;&#x2F;github.com&#x2F;sw-yx&#x2F;swyxkit&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sw-yx&#x2F;swyxkit&#x2F;</a> for the past year and it&#x27;s now updated for 1.0. hope it helps someone get going!
评论 #33988331 未加载
clairegraham超过 2 年前
I&#x27;ve been using SvelteKit since July of this year on downforeveryoneorjustme.com and it&#x27;s easily my favorite Javascript framework at this point. I found Svelte made sense to me almost immediately and debugging issues has always been a breeze.<p>Congratulations to the Svelte&#x2F;SvelteKit team!
dimmke超过 2 年前
Congrats to the team for this!<p>I have been building an application in SvelteKit and it&#x27;s an incredible framework. I really believe it&#x27;s going to become the dominant front-end framework in the next few years.
评论 #33986820 未加载
kretaceous超过 2 年前
SvelteKit 1.0 is the one release I was actually waiting for. I&#x27;ve seen a lot of flashy stuff launch in the frontend framework recently but this one feels...genuine?<p>Huge congratulations to Rich and team! Hope I&#x27;ll be able to contribute to Svelte&#x27;s growth someday.
kenkunz超过 2 年前
Congratulations to the whole SvelteKit team!<p>I&#x27;ve been using Svelte &#x2F; SvelteKit for 1.5 years now – it is without comparison the most enjoyable and productive web f̵r̵a̵m̵e̵w̵o̵r̵k̵ language I&#x27;ve ever used.<p>I&#x27;m lucky enough to work with Svelte &#x2F; SvelteKit full-time. I&#x27;m gratified that the site I help build and maintain is included in the SvelteKit showcase: <a href="https:&#x2F;&#x2F;kit.svelte.dev" rel="nofollow">https:&#x2F;&#x2F;kit.svelte.dev</a><p>Trading Strategy: <a href="https:&#x2F;&#x2F;tradingstrategy.ai" rel="nofollow">https:&#x2F;&#x2F;tradingstrategy.ai</a>
评论 #33998692 未加载
jmull超过 2 年前
I&#x27;m just completing a job using svelte&#x2F;kit, tailwind, postgres, typescript.<p>Actually, I was new to the entire stack, but it went smooth as butter. (Though I have plenty of experience with JS, HTML, CSS, other databases, etc.)<p>IMO, svelte and sveltekit are well designed and have a great dev experience.<p>LOL, as I was writing this he was apologizing on the stream for the breaking changes. That was a bit of a pain, but not really that bad. My only real gripe is using folders to organize both layout hierarchy and route hierarchy is going to turn out to be a mistake.
评论 #33988611 未加载
评论 #33987884 未加载
评论 #34022613 未加载
owlbynight超过 2 年前
If you&#x27;re just learning SvelteKit, check this tool out: <a href="https:&#x2F;&#x2F;github.com&#x2F;svelte-add&#x2F;svelte-add" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;svelte-add&#x2F;svelte-add</a><p>It will save you a ton of time by making it really easy to add integrations to your projects (like Tailwind, Bootstrap, Supabase, Jest, etc)
yamrzou超过 2 年前
There is a plethora of javascript frameworks: React, Vue, Svelte, Remix, etc. If I know nothing about front-end development, and would like to learn one that is:<p>- Intuitive<p>- Suitable for small projects as well as large projects.<p>- That is here to stay, i.e. either adopted by many companies, or its adoption curve is going up.<p>Which one should I pick? Would Svelte be a good choice?
评论 #33987840 未加载
评论 #33987737 未加载
评论 #33989760 未加载
评论 #33988796 未加载
评论 #33992463 未加载
评论 #33987591 未加载
评论 #33987693 未加载
评论 #33987586 未加载
评论 #33996676 未加载
评论 #33987579 未加载
评论 #33987784 未加载
yawnxyz超过 2 年前
For anyone who might have missed the announcement hidden in the launch video, there&#x27;s Svelte Auth now from the Vercel NextAuth team: <a href="https:&#x2F;&#x2F;vercel.com&#x2F;blog&#x2F;announcing-sveltekit-auth" rel="nofollow">https:&#x2F;&#x2F;vercel.com&#x2F;blog&#x2F;announcing-sveltekit-auth</a>
评论 #33991916 未加载
lairv超过 2 年前
Great news and looking forward to how this goes. I still find it incredible that the frontend javascript ecosystem hasn&#x27;t found a reliable and productive contender yet, a framework you could be sure would be still relevant without too much changes in 5+ years, something like what Ruby on Rails is for full-stack.<p>Some would say that React&#x2F;NextJS has this role but I have to disagree. When using React&#x2F;NextJS you still have to rely on third party library for routing, state management, querying etc. like React-Query, React-Router, Redux (Next has a router but you still need libraries to do the rest). Some of these libraries change a lot, some become less relevant, new libraries emerge, and in the end when you start a React project you must go through the &quot;library shopping&quot; step.
评论 #33987271 未加载
评论 #33990463 未加载
efields超过 2 年前
Congrats to Svelte. More than a couple years ago, I gave my team the opportunity to go React, Vue or Svelte after giving them time to test them out. React was basically the legacy code that we were familiar with. This was right around the first hooks release and after using it for a while, and we had a nasty redux state manager, and nothing about React felt truly great for DX besides JSX, and that was everywhere already.<p>I&#x27;m happy with Vue but every time I look at Svelte code I get a bit jealous. Its a very nice environment, one I would pick up for personal projects if that time was there, and I wish Svelte godspeed and a huge adoption curve.
omnibrain超过 2 年前
All the praise for SvelteKit in this thread peaked my interest. But where would I start?<p>I&#x27;m currently looking around to find a modern &quot;toolkit&quot; to write a new webbased frontend for our traditional desktop app. It&#x27;s goin to be more or less CRUD with lots of tables&#x2F;grids.<p>Currently I favour vue.js with Quasar because of all the tooling and ressources it offers. It looks like it&#x27;s easy to start with a traditional &quot;navigation on the left, content on the right&quot; layout.<p>I need nothing fancy, it&#x27;s going to be business CRUD for a small circle of users. Deployed on premises at our customers sites.
评论 #33987651 未加载
评论 #33992512 未加载
评论 #33987650 未加载
Caged超过 2 年前
Svelte is such a pleasure to write and work with. It follows my mental model really well. Congrats to the team on this amazing milestone!
samtp超过 2 年前
While the breaking changes were rough this year, the new structure is a huge improvement over before. It is now extremely clear the order that items are loaded, and what is loaded on the server vs client. Form actions are also amazing.<p>Congrats to the team and thanks for all the hard work!
dhucerbin超过 2 年前
Fantastic news! Although I loathe writing libraries [1] in Svelte, I love writing apps and kit is great extension to server side. I like similar to Remix push for Web APIs, like forms for mutations etc. I like nested layouts with data endpoints. I like that most of the internal state is visible as reactive store.<p>[1] Creating complex type definitions for more generic components is hard and require knowledge about internals.
评论 #33993392 未加载
dceddia超过 2 年前
Exciting to see this hit 1.0! The new tutorial site looks great and I love that the sidebar is searchable now. Also the Cmd-K search on the docs (<a href="https:&#x2F;&#x2F;kit.svelte.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kit.svelte.dev&#x2F;</a>) is awesome to have as well.<p>I&#x27;ve been really enjoying working with Svelte for the last year or so now. My main project is a video editor, running under Tauri and using plain client-side Svelte, but I&#x27;ve also used SvelteKit to throw together a few little admin dashboard-y things and it&#x27;s been very quick to get started with. Right now those projects are pretty lightweight too, just SvelteKit with TypeScript, the pg-promise package to connect with Postgres, and a handful of handwritten SQL queries.<p>Congrats to the team! Looking forward to see what the future holds for Svelte[Kit].
nathias超过 2 年前
I&#x27;m a React expert, but whenever I can I choose Svelte, it really is a joy to use. I&#x27;ve been using SvelteKit for some time now, it&#x27;s great to see it out of beta so I can shill it to more projects.
drschwabe超过 2 年前
SvelteKit is nice to rapidly develop websites (after some initial training&#x2F;familiarization&#x2F;minor frustrations stage), I only wish it was a library w&#x2F; perhaps a separate CLI utility and the framework optional; ie- if they exposed some core features as re-usable functions or one-off CLI commands to build a static site with its clientside window.location&#x2F;cached routing technique that makes sites feel blazing fast for example.<p>This way you wouldn&#x27;t have to drop in and adopt the entire framework just to get one or two features.
akmittal超过 2 年前
Congratulations to the team for releasing this.<p>For someone who hasn&#x27;t followed svelte closely, How much JS sveltekit ship by default using SSR
评论 #33986851 未加载
arxpoetica超过 2 年前
The Sapper is dead! Long live the SvelteKit!
tracerbuilt超过 2 年前
I’ve been using SvelteKit since very early beta, and it’s been amazing to watch it evolve along the way to 1.0. It is by far and away the most intuitive framework I’ve used and I can’t say enough good things about it.<p>Congratulations to the team, and keep up the good work!
lewantmontreal超过 2 年前
How so people feel about client side navigation? Browsing svelte.dev it appears back&#x2F;forward navigation now requires a request each time as browser cache is no longer usable.<p>Page refresh also seems to reset scroll position but that might be unrelated.
评论 #33989717 未加载
评论 #33989686 未加载
评论 #33989676 未加载
jerriclynsjohn超过 2 年前
Been using Sveltekit and love what the community has done to the framework. Makes life of a developer very straightforward and I&#x27;m sure that Sveltekit will rise to be a dominant frontend framework soon.
mattwoodnyc超过 2 年前
There are a handful of them here - <a href="https:&#x2F;&#x2F;trpc.io&#x2F;docs&#x2F;example-apps" rel="nofollow">https:&#x2F;&#x2F;trpc.io&#x2F;docs&#x2F;example-apps</a>
didiraja超过 2 年前
Congrats all Svelte team and community, highly antecipated project. Played a lot with the early releases. To me, Svelte suite is the best option for front-end applications.
tmd83超过 2 年前
Is there any option if I want to do traditional (non JS) SSR but also want to share an API endpoint for both browser and other use cases?<p>Seems like a JS frontend framework or a JS SSR is the only option for such use case. If SSR and API force a JS backend that leaves a lot of the benefit that other languages bring to the table and effectively limiting you to 1 (JS) or 2 (TS including) languages. Seems like a sad state of affair in that regard.
评论 #33996648 未加载
xiphias2超过 2 年前
Thanks for finally having a SvelteKit tutorial :)<p>I was using SvelteKit, but I really need the tutorial to get better at it (also to adapt better to the changes that have happened).
foxbee超过 2 年前
I&#x27;ve been waiting for this for months! Credit to the team. Looking forward to the weekend to play around with it. Also, super excited for svelte 4
Chipshuffle超过 2 年前
Is Svelte and in extension SvelteKit somehow the next step in the evolution of frontend frameworks? From what I know it has more fine grained reactivity than for example React or Vue and should therefore just run more efficient? Or has the approach of Svelte also drawbacks that I am not aware of?
评论 #33990806 未加载
adamnemecek超过 2 年前
Perfect timing!<p>I literally started working on a project in Svelte after spending like two afternoons trying to do it in React.<p>Svelte is such a God send. So much simpler and powerful than React. Not to mention the fact that React only handles the UI layer but is too unopinionated w.r.t. the application architecture.
solumunus超过 2 年前
SvelteKit is the most pleasant web dev experience I&#x27;ve encountered in a long career.
batesy超过 2 年前
Well after reading the comments in this thread, I&#x27;m learning Svelte over the Holidays.
gedy超过 2 年前
I enjoy Svelte a lot and congrats on the release. However the job market for Svelte seems really weak, at least for US dev salaries. I hope Sveltekit increases adoption, as it&#x27;s a nice alternative to NextJS
topicseed超过 2 年前
Is Svelte eating Vue&#x27;s lunch but not really eating React&#x27;s?
评论 #33994212 未加载
domakidis超过 2 年前
What would be the best route to upgrade a medium sized project from say `1.0.0-next.263`?<p>There&#x27;s 327 intermediate versions up to this one and a considerable amount of breaking changes.
评论 #34025004 未加载
sergiotapia超过 2 年前
Congratulations on the milestone!<p>I&#x27;m a bit confused, does this mean I can use Prisma with Sveltekit out of the box? It&#x27;s server side rendered like a typical expressjs app?
asdfdelta超过 2 年前
I&#x27;ve been following Svelte since it first appeared on the State of JS survey. So cool to see it evolve over time and happy to see all the hard work pay off!
wobedi超过 2 年前
Have been using svelte&#x2F;sveltekit&#x2F;sapper in production for two years now. Used React before and never looked back. Congrats on 1.0!
yewenjie超过 2 年前
I wish Svelte allowed easy usage of one-off React component - to take advantage of the huge ecosystem. Astro does this, does anything else do?
FractalHQ超过 2 年前
Sveltekit has been transformational for me. I can&#x27;t express enough gratitude to the legendary team who made this happen. Congrats guys!!!
hedgehog超过 2 年前
&quot;This app requires modern web platform features. Please use a browser other than Safari.&quot; Looks cool but not production ready.
评论 #33987495 未加载
评论 #33987465 未加载
评论 #33987228 未加载
评论 #33987458 未加载
评论 #33987066 未加载
ericmsimons超过 2 年前
Congrats to Rich &amp; team- SvelteKit is an amazing experience to develop with. Excited to use 1.0 on some new projects!
theonlytails超过 2 年前
congrats to everybody on the svelte team!
rohanrajpal超过 2 年前
Congrats team, we&#x27;ve built a HUGE SaaS with Sveltekit + NestJs and it has been a wonderful experience
newbieuser超过 2 年前
After a few minor versions, I hope they don&#x27;t start to deprecate the newly added features.
KoljaL超过 2 年前
Great! Congrats to all the maintainers. I wish you will have a really really nice Christmas
stephenstuder超过 2 年前
Svelte is soooo good. Hope it starts to get used more in large orgs.
joeconway超过 2 年前
Congratulations to the team, you’ve built something really excellent
a3k超过 2 年前
Finally, I&#x27;ve been waiting for this moment for 2 years
johninvirtual超过 2 年前
Congrats to all the people behind this, thanks for your work.<p>I love svelte
qprofyeh超过 2 年前
While most of the comments here seem positive… A custom template language is like another programming language to learn (to make mistakes in). I prefer JSX&#x2F;TSX which is closer to reusing HTML.
评论 #33989712 未加载
评论 #33992562 未加载
评论 #33998652 未加载
评论 #33989756 未加载
keyboards超过 2 年前
Thank you so much for this. I love Svelte to bits.
gsanderson超过 2 年前
Congratulations! Watching the live stream now.
moklick超过 2 年前
Congrats to the launch. This looks so good :)
wirahx超过 2 年前
don&#x27;t forget to watch the livestream!
评论 #33986813 未加载
davjhan超过 2 年前
Congratulations to the team!
stephenstuder超过 2 年前
Its so freaking good, hope large orgs start using it
torartc超过 2 年前
Congrats team. SvelteKit is a great experience.
ramshorst超过 2 年前
Yayyyyy !
pier25超过 2 年前
Bravo! Congrats!
Sk012超过 2 年前
Add Comment
joeldrake超过 2 年前
Hurray!
onlyspaceghost超过 2 年前
Amazing!
oxff超过 2 年前
Why is there a new frontend-whatever-work &#x2F; tool every week? Database stuff is fairly stable, so is backend stuff. Browser APIs seem stable to me too? Why can&#x27;t you guys decide that this is how things are best done
评论 #33986937 未加载
评论 #33987117 未加载
评论 #33986995 未加载
评论 #33987113 未加载