Next.Js Can You Pass Props From a Server Component to a Client Component?
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- looks like you can if you are using the app router and the data is serializable.
Data that is not serializable:
- React elements, or JSX
- Functions, including component functions or any other function that is not a Server Action
Classes
- Objects that are instances of any class (other than the built-ins mentioned) or objects with a null prototype
- Symbols not registered globally, ex. Symbol('my new symbol')