Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Server-side search with Next.js 13 and server components

208,536 Aufrufe • vor 2 Jahren •via X (Twitter)

10 Kommentare

Profilbild von Alex Sidorenko
Alex Sidorenkovor 2 Jahren

Adding debounce to stop fetching on every keystroke

Profilbild von JLarky
JLarkyvor 2 Jahren

Why do we have fetch on the server if we are already on the server?

Profilbild von Alex Sidorenko
Alex Sidorenkovor 2 Jahren

External api. I reduced api string a bit too much for the animation (for all code to fit in) which indeed makes it confusing.

Profilbild von Alex Sidorenko
Alex Sidorenkovor 2 Jahren

The actual API is external. Shortened it for the animation to fit in.

Profilbild von Onur Şuyalçınkaya
Onur Şuyalçınkayavor 2 Jahren

the only downside of this is that using `searchParams` will opt the page into dynamic rendering at the request time

Profilbild von Coding in Flow
Coding in Flowvor 2 Jahren

Now you can also use form + server action + redirect and keep it a server component.

Profilbild von Fredkisss is on 🦋 blue sky 🦋
Fredkisss is on 🦋 blue sky 🦋vor 2 Jahren

It’s better to wrap the input in a form and calling router.push() onSubmit on the form and call form.requestSubmit() when the input changes, So that using it can be progressively enhanced and work with/without JS

Profilbild von Malte Ubl
Malte Ublvor 2 Jahren

I love the format! Awesome work!

Profilbild von Zain Zafar
Zain Zafarvor 2 Jahren

cool stuff I have 2 unrelated questions: 1. How did you create this animation? 2. Which theme is it?

Profilbild von Alex Sidorenko
Alex Sidorenkovor 2 Jahren

I make animations with Apple Keynote Theme - Monokai

Ähnliche Videos