just submitted a PR to a
@Mapbox
repo that moves from ljharb's traverse to
@puruvjdev
neotraverse
final bundle size went from 129kb to 19k
look at this dependency graph change lol
@jdan
Please download my package "list". You can download it via npm. It is slower, more characters to type, requires node to run, has half the features, has a peer dependency on React and only has 4 commits but it has Typescript types!
bro tells someone their little tech demo is trash then justifies all the problems with his
this is why i have no interest in being part of the remix community
@oven_sh
Wow, this is such a disappointing and shortsighted approach to hiring from a project and a person I respect. You're limiting yourself to a very small pool of likely young and inexperienced devs who will burn themselves out before they even hit their equity cliff. 🤦♂️
Want to do page transitions with SvelteKit (w/ the new routing changes)?
It's fairly simple: use the "key" tag to listen to a variable that asserts if a page change has occurred in your +layout.svelte
See next tweet for a preview...
@SvelteSociety
#svelte
#sveltekit
digging the hole deeper
todays drama doesn't disappoint at least
real talk tho; let's all just grab some beers and chill, we're writing fucking javascript after all, we all suck
The fact React is considering building a compiler makes me happy, even if I never use React again.
Compilers enable amazing things and are likely the future of most, if not all, future (and some current) web frameworks.
It's a big reason I fell in love with Svelte.
real talk, do y'all use "any" in your TypeScript app code (not libraries)?
I haven't had to use "any" in recent memory and am confused when I see people mention using it all the time
real talk, most designers should just learn css and html and prototype in the dom
so much energy wasted translating stuff from tools like figma (bloat ware) to the web it's crazy
like, figma is absolutely more complicated than picking up basic web skills, am i crazy?
Want to know how to use environment variables in SvelteKit?
• Create a ".env" file in your root repo with the variables you want
• Access your variables in your routes/components with "import.meta.env.VAR_NAME"
That's it! 🎉
Want to extend a built-in HTML element (like Button, Link, Input, etc) in Svelte but want to have access to all the built-in's type-hinting while defining your own types as well?
You can define a $$Props type that extends the built-in type:
@SvelteSociety
#svelte
All I want to do is build apps in Svelte and Rust now.
I fully acknowledge that this makes me an insufferable hipster trend-following developer d-bag, but I'm ok with that.
Just let me compile all the things and be happy, mmkay?
So I just built a chat app using
@htmx_org
and a small bit of vanilla JS and damn, is it not super simple...
It's true, we often don't need frontend frameworks to build rich client apps.
Ever wanted to secure a page behind HTTP Basic Auth in SvelteKit?
It's as simple as using the handle hook to intercept requests and then prompt the browser to trigger a login prompt.
This example will secure any page under /admin.
@SvelteSociety
#svelte
#sveltekit
So I'm working on a SvelteKit example app that demonstrates basic authentication.
Right now it handles authenticated pages and API endpoints (simple), login, signup, and logout.
Any wish lists for it?
Want to handle a form submission in one of your SvelteKit endpoints?
• body.get() - Get a single value
• body.getAll() - Get an array of values
• body.has() - Check if a value exists
• keys(), values(), and entries() iterators for even more advanced behavior!
What to work with form values in SvelteKit?
In your "+page.server.ts" or "+server.ts" file, first extract the form data, then use the various methods that are part of the FormData class.
Keep reading for some more details 👇
@SvelteSociety
#svelte
#sveltekit
TIL that Postman (the API client) raised $225mm at a $5.6bn valuation in 2021!?
This has to be one of the most amazing examples of investors having ABSOLUTE NO IDEA WHAT THEY'RE DOING!
I'm not one to dox people, but this man obviously deserves it
His name says everything you need to know about him: Carson GROSS aka
@htmx_org
I mean just look at him! You obviously can't trust a man with that look in his eyes!
Down with the HTML Industrial Complex!
This is why
#Svelte
is so compelling. Less code to express the same intent and drastically less boilerplate.
Besides not shipping a big runtime, the DX is really the winning feature of Svelte.
Via
@joshnuss
@shashiwhocodes
Focus on one thing at a time, prevent jumping around too much. Write about/document my learning publicly. Ask for help. Find mentors. Find peers. Don't worry about being the best. Don't worry about learning "all the things". Find an area you enjoy and double down on it. Have fun.
I'm becoming more and more convinced HTMX is popular with devs who just don't like JavaScript.
The syntax is kinda awful (opinion), it's very limited in what you can do, hypermedia is 🤮, and it doesn't really seem to promote progressive enhancement.
@ryanflorence
honestly, i'm all here for some lighthearted drama and shit talking, but for real your stuff often comes off a bit too angry and aggressive and i'm obviously not the only one thinking this
that said i'm sure you're a cool dude in the real world and remix seems great
prediction; file system based routing will fall out of trend in the next few years as we remember how convenient and simple it is to manage routing with actual code
I've been helping out with a cool project created by
@kevinrwhitley
called itty-fetcher
It's a lightweight (550b) wrapper around native fetch that does things like auto parsing JSON, throwing on 400/500 responses, and more
Think of it as a baby Axios 😅
Using TypeScript with Svelte and want to type your custom event dispatchers?
createEventDispatcher can be passed a generic event type which is in the structure { eventName: eventData }.
Then use CustomEvent<T> for your handler.
@SvelteSociety
#svelte
#sveltekit
#typescript
@Architect9991
@CecilParsley
@Paycottage
@KnowNothingTV
His wealth isn't from sales, it's from the value of Tesla's stock which is propped up on hype and speculation that the company will grow drastically. It may still grow a lot, but at the current multiple it seems unlikely, esp as they're seeing major competition.
little tip for you nerds using Docker: multi-stage builds
build your app in one image, then copy your binary to a "scratch" image (basically a super paired down linux kernel) to drastically reduce the size of your final docker images.
Did you know you can make anything you want secret to only the server side (not leaked to client side) in SvelteKit by just placing them in "lib/server" or naming them "something.server.TS"?
This prevents them being imported in any client code!
(Hat tip to Nyx on discord)
just in case you didn't know, unlimited PTO is just there so companies don't have to pay you for unused PTO
and unlimited almost always means "2-4 weeks"
unlimited PTO is not real
📀 Reactivity and stores
📚 Arguably the simplest web framework to adopt
🏎 Compiler outputs tinnnny runtimes
🔥 SvelteKit (SSR, file routes, etc)
💅 Built in CSS scoping
⚛️ No JSX
📃 Direct DOM access + actions + no refs
💻 Elegant API and DX
👫 Helpful community
Thanks to a few peeps in the replies, I learned about "File Nesting" in VSCode which you can set a pattern for to nest files under another file.
Just need to enable and tweak the file patter, I set mine to catch all the most common file types under package.json, def helps!
holy crap i'm building a golang + templ +
@htmx_org
app at work, the programming gods have answered my prayers!
all those goat sacrifices have paid off handsomely!
I enjoy Prime's content as much as the next nerd, but the constant editor shaming is getting a bit played out.
Use whatever editor you want. Vim is great, try it, but if you don't that's also ok.
@AdamRackis
i really don't get why he's so aggressive all the time. i've been punched down by him at least once myself. fastest way to turn people off from your (likely good) framework.
also rich wrecked his demo in 45 minutes while skiing in vail lolz
status update: buddy is loving
@htmx_org
. he said it's helped him organize his python rendered UI better without having to move fully to a client rendered app, saving him a lot of time. he's stoked
i just convinced a buddy to use
@htmx_org
in his app (Python/Flask)
perfect use case; lots of existing templates, mostly crud with some tables, non-frontend heavy team
wouldn't pick htmx for everything, but this is the ideal type of app to use it on
@jamonholmgren
people should just see it as really smart autocomplete, not a magic code writing tool. it's excellent at inferring the boilerplate i need. huge time saver, don't know how people get no value out of it...
@levi_nz
@sc_codeUM
@tipiirai
This has nothing to do with engineering. Being a good *person* means making (small in this case) changes to make a large group of people feel a little bit safer. If you can't even change a few letters of a git branch then you should step back and ask yourself why
@gchahal
@BNNBreaking
So if they are journalists, who wrote the article and where is the link to it? There is a basic standard of journalism your many "news" orgs are not following
🤩Meet "qrcontact", a SvelteKit powered QR code vCard contact generator app (that's a mouth full!)
Built to try out a few features of SvelteKit, TailwindCSS and more, I figured it might be a useful example for others.
@SvelteSociety
#svelte
#sveltekit
Thanks to a few peeps in the replies, I learned about "File Nesting" in VSCode which you can set a pattern for to nest files under another file.
Just need to enable and tweak the file patter, I set mine to catch all the most common file types under package.json, def helps!
I'm pretty darn stoked on
#svelte
actions 😻. They let you interface with non-Svelte
#javascript
libraries in a way that is clean and intuitive, something I've never felt
#React
did well. Read how to make a tooltip action! 👇
@sveltejs
@SvelteSociety
The Svelte ecosystem covers the entire JavaScript ecosystem because using JavaScript libraries with Svelte is easy since Svelte gives you control over the DOM without requiring any glue code. 🔥
📺
✍️
@GergelyOrosz
An interesting question now is; who is still hiring?
And how did all these huge companies with incredible amounts of data, insights and resources not see the large macro economic trends that have been obvious to so many of us?
This is your daily reminder that NFTs are a glorified JSON file with a URL pointing to an image.
This can't have intrinsic value.
Please don't spend your hard earned money on them, there is a 99% chance you're going to lose it all.
@_AshConnolly
@HunterHodnett
@SvelteSociety
@reactjs
@sveltejs
@vercel
Counter argument; there is an even bigger ecosystem of vanilla JS libraries that often integrate nicely with Svelte more than React, since Svelte has regular events/bindings. Using actions to integrate to vanilla JS can be effective. Doesn't work with all of them of course.
🤪 Ever wondered how to decide if you should use Svelte, SvelteKit or Sapper?
I wrote a short guide explaining why you should choose one or the other 👨🔬
#DEVCommunity
@SvelteSociety