正在加载视频...

视频加载失败

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

208,536 次观看 • 2 年前 •via X (Twitter)

10 条评论

Alex Sidorenko 的头像
Alex Sidorenko2 年前

Adding debounce to stop fetching on every keystroke

JLarky 的头像
JLarky2 年前

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

Alex Sidorenko 的头像
Alex Sidorenko2 年前

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

Alex Sidorenko 的头像
Alex Sidorenko2 年前

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

Onur Şuyalçınkaya 的头像
Onur Şuyalçınkaya2 年前

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

Coding in Flow 的头像
Coding in Flow2 年前

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

Fredkisss is on 🦋 blue sky 🦋 的头像
Fredkisss is on 🦋 blue sky 🦋2 年前

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

Malte Ubl 的头像
Malte Ubl2 年前

I love the format! Awesome work!

Zain Zafar 的头像
Zain Zafar2 年前

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

Alex Sidorenko 的头像
Alex Sidorenko2 年前

I make animations with Apple Keynote Theme - Monokai

相关视频