Props từ Server sang Client Component phải serializable (có thể convert to JSON): strings, numbers, booleans, arrays, plain objects.
- Không thể truyền: functions, class instances, Symbols, Date objects (trực tiếp), React elements cũng có hạn chế.
- JSX làm children có thể pass.
- Cần serialize Date thành string trước khi pass.
Props passed from a Server Component to a Client Component must be serializable (convertible to JSON): strings, numbers, booleans, arrays, and plain objects.
- You cannot pass: functions, class instances, Symbols, or Date objects directly.
- JSX as children can be passed.
- Serialize Dates to strings before passing them as props.