Passing server info to client component
Answered
In&Out posted this in #help-forum
In&OutOP
Hey folks, i have a question about how safe is it to pass a prop to client component from a server component?
Answered by riský
also, its safe as long as the all the data you send should be visable (like dont get whole user from db and send it all - you should only send whats needed and not password per say)
6 Replies
In&OutOP
'use server'
function page() {
return (
<div><Client stuff={stuff} /></div>
)
}
export default pageSomething like this
Or do I have to do it vice versa
just going to say
use server means server action and not use client but serveralso, its safe as long as the all the data you send should be visable (like dont get whole user from db and send it all - you should only send whats needed and not password per say)
Answer