arrow_backBACK TO DRILLS
Black Beltserver-componentsPREMIUM
Passing Data Across the Server-Client Boundary — Component References vs Server Actions
A Server Component needs to give a Client Component something it can invoke later in response to a click. Passing an ordinary icon component reference as a prop fails to serialize, but passing a function marked with the "use server" directive as a prop works and can be called via onClick. What explains the difference?