next13-pocketbase-demo icon indicating copy to clipboard operation
next13-pocketbase-demo copied to clipboard

loading and error fails to work

Open t9fiction opened this issue 2 years ago • 1 comments

The folloing error.tsx and loading.tsx fails and gives the following error

Unhandled Runtime Error 1 of 1 Error: Functions cannot be passed directly to Client Components because they're not serializable. <... parallelRouterKey=... segmentPath=... error={function} errorStyles=... loading=... loadingStyles=... hasLoading=... template=... templateStyles=... notFound=... notFoundStyles=... childProp=... rootLayoutIncluded=...> ^^^^^^^^^^

t9fiction avatar Jan 04 '23 17:01 t9fiction

Just found out the solution.

"use client";

check this out

t9fiction avatar Jan 04 '23 18:01 t9fiction