Next.js · Senior · Question 54 of 75

Why does useOffline() from next/offline always return false in a project?

Explanation

The flag turns on connectivity detection and automatic retry of blocked navigations, prefetches and Server Actions. The hook is also false on the server and before hydration.

Further reading

Problem with a question

Next.js · Senior · question 54

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