Skip to content
Discussion options

You must be logged in to vote

The component you have called Server Component, can still be opted in to a client module, because it doesn't do anything, that would prevent that.

You could for example:

  • Make it async, and then add some state in your client component, try changing that state, and you'll most likely see an error (you have a counter)
  • Access fs, or some other Node.js API.
  • import server-only import 'server-only', note that you'd need to install this package

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@developer-choi
Comment options

Answer selected by developer-choi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants