'use client' directive throws error
Steps:
1. npx create-next@latest
2. accept app dir usage
3. create client component with 'use client' directive at the top
4. import and use client component in default home page
5. npm run dev
6. I get unhadled runtime error, "undefined is not valid JSON"
7. when I remove the "use client" directive everything works
3 Replies