I don't know if it's right, but it feels good.
I've found myself replacing 100% of my existing data-fetching/loading code in
@nextjs
with server components and suspense. All of my code pretty much looks like this now.
My favorite part is watching the stream using curl
Here's a tutorial no one asked for
It's the BROH stack bro
Bun + React + drizzle Orm + Hono
+ Kinde Auth + TanStack Query + TanStack Router + TanStack Form + Tailwind + Shadcn + Zod + Neon +
just watch it and find out, it's better than htmx
SSR (left) vs CSR (right)
Simulated slow internet and slow server processing. The network request takes 3 seconds, processing the request takes 3 seconds.
When I click on a navigation link, that link should immediately reflect my action by turning bold, the url should update
✨ Eraser AI, the first copilot for technical design.
So many coding copilots, but what about a copilot for non-coding tasks like drawing arch diagrams and writing tech docs?
After 1M diagrams generated, Eraser AI is here for engineers and architects.
@matteocollina
I can't tell if you're telling people to stop complaining or asking people to give money. I went to look for a sponsor/donation button somewhere, like most open source projects have, and I could not find one for node.
@dragidavid
@nextjs
But thanks to a recent tweet by
@ThePrimeagen
, I've started wrapping my "user-facing" promises in a custom `noThrowReturnError` function so that I don't end up using try catch.
It turns out i've been overcomplicating things.
This is how you manage SSL certificates, forward http to https, and handle traffic as a reverse proxy:
sudo vim /etc/caddy/Caddyfile
my.domain {
reverse_proxy localhost:3000
}
That's it, nothing else. Thank you
@caddyserver
@Zimano_
@nextjs
There are a lot of reasons why data fetching with useEffect is undesirable.
* useEffect is complex:
* You always render the page first without the initial data
* You make more network requests than is often necessary
* Race conditions
* etc.
@clientside_dev
@nextjs
Streaming.
@nextjs
has made it really easy to stream with suspense and loading.tsx pages.
Also, getServerSideProps is indirect so the dev experience isn't as good. Server components let us write and execute the async code right where we need it.
I made this last summer and wanted to turn the footage into a YouTube video, but I'm bad at that so I'll post a few seconds here instead
I used my iPhone with a game controller to wirelessly control an ESP 32 that's connected to two a hacked hoverboard controllers so I have a
@threepointone
@kentcdodds
The moment I saw `class default class Counter {`,
I thought, oh shit this is actors. One paragraph later "That’s it. That’s the big idea. You can call it the Actor model"
Now all we need is to replace JavaScript with Misty lang to complete Douglas Crockford's prophecy
To anyone trying to learn how to code:
Don't stop trying.
Don't stop writing code.
Make a side project that you genuinely get excited about, it doesn't matter what it is, just be excited about working on it.
Don't think you've wasted time because you were stuck on problem for
I used to force my relational data into DynamoDB just so i could get a fast and pay-as-you-go (free) database service for my side project. Now I use
@tursodatabase
.
I know that Turso has tons of amazing features that make it great for apps at large scale. It's an amazing set of
How Apple Intelligence works
1. Apple Devices are now AI devices. They run AI models locally using all your private information so we get context aware assistants. Works without internet or data sharing
2. Apple has data centres that follow Apple's commitment to privacy. They
I'm almost done making the longest tutorial of my life, now I need help making a youtube title. Here's the tech stack:
bun, hono, react, drizzle, kinde, tanstack query router form, postgres - neon, flyio
How do you do this in a SSR app?
CSR = easy
SSR = ?
1. submit
2. immediatly navigate to new page
3. show loading state of new thing created
4. show new thing created in it's natural state
All while allowing the user to still navigate around without blocking
This is simulating
I had no idea you could just make a native windows desktop app with swift
This is a good thing because swift is a good language
More people should use swift
@dreamsofcode_io
That was my experience until I learned about Turso about a year ago. Honestly, just go try out
@tursodatabase
in a project. Everything just works as you would expect it to with any sql database, then you realize it’s way faster, then you realize replication and distribution are
I love MySQL but never used planet scale or MySQL services because the Postgres ones always seemed better and cheaper
@CockroachDB
has been amazing and free for a long time. There's databases like neon or services like xata, free for now
But
@tursodatabase
is my current fav
When I was 17 I built a burp and fart piano and put it on the iOS App Store. Its had millions of downloads and is the most successful thing I’ve ever built
“some times you build what you must, because you can”
"but what should i build?"
i am building a real time ascii game engine in go to be displayed in neovim
some times you build what you must, because you can
1990 the WWW was born
1992 CERN is using the violaWWW browser which supports client side scripts for interactive web pages
1995 sun gives us Java and Netscape gives us JavaScript (no relation)
2024 we’re still confused if we should do client side rendering
What are x, y, and f?
x and y are both simple scalar values
f is a pure function, it will return the same output for a given input
You can try this in any programming language
@tmoutinho_
@nextjs
The value would need to exist server side at the moment the function is called. So it could be sent in the url or a cookie.
In my code, I'm only getting the current users' orders using an access token stored in a cookie from aws cognito
Asking me "How's it going?" forces me to observe my emotional state and make it deterministic. But I wish to keep my life in a superposition. Some describe me as chaotic
You want to know how to be a better programmer? Write more code! That’s the secret, write code. You don’t learn to ride a bike by watching videos on how to ride a bike, you get on that damn bike and you practice. And when you fall off the bike, you get back on and try again.
I don't know if it's right, but it feels good.
I've found myself replacing 100% of my existing data-fetching/loading code in
@nextjs
with server components and suspense. All of my code pretty much looks like this now.
My favorite part is watching the stream using curl
Unit tests should run quickly and test some in-between logic. You shouldn't have to manually navigate a browser, log in, and create a new post just to test the hashtag verification feature. Put that logic in it's own function and unit test it. Then the e2e tests exist, but are
@thdxr
I love named function parameters!!!!
there is suggested importance of the name of the argument, instead of the order
I wish this was valid typescript:
function register({username: string, password: string})
But my first language was objective-c so……..
Vercel Functions are now faster—and powered by Rust.
◆ 30% faster cold starts for smaller workloads
◆ 80ms faster (average) and 500ms faster (p99) for larger workloads
Learn more about our rewrite of the core to Rust.
I think auth libraries that wrap next apps in a <Provider> aren't going to work anymore.
When partial prerendering comes to
@nextjs
, most of my web page can be statically generated while my nav bar with the logged in user's avatar can be dynamically generated. Awesome!
This is somewhat trivial to do with a CSR SPA. Can someone tell me how you achieve this with an SSR framework?
You hit submit to create a new thing and you enter a kind of optimistic update phase. You immediately redirect to the a different route and you see the list of all the
Docker makes some things easier and some things more complex. My issue with docker is that there's a learning curve in the beginning, in order to use docker, you have to learn docker. And in the end, you still have to understand how VMs work. So I avoid using docker or teaching
I started too early to have tutorial hell. I just had to get my hands on a book, usually a tutorial book, then make my way through the chapters. The real learning happened when I finished a chapter, I kept coding and adding features and tweaking until the app was my own.
I made a GPT and it works way better than I expected. It only writes code and it can read up to date docs. I'm genuinely impressed with how simple that was to make
@elonmusk
Wow, it's amazing how long it's taken for Twitter to realize the beauty of open sourcing. It's almost like they were living in the 90s with their closed-minded approach. But hey, better late than never I suppose.
As for recommending tweets, let me give you an example of how that