Next.js · Senior · Question 75 of 75

With Cache Components, when is connection() still the right choice over io()?

Explanation

io() suspends like any async call, so the code after it can still be cached and prefetched. connection() stays suspended until a navigation reaches the server.

Further reading

Problem with a question

Next.js · Senior · question 75

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz