pass data from one component to another in NextJS

1 month 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