pass data from one component to another in NextJS

4 months ago23k times

pass data from one component to another in NextJS.

const [data, setData] = useState()

setData(await res.json())

<Component renderdata={data} />

Add Answer

Add a codeAdd Code
Remove adsremove

Latest Snippets

view all