In my nextJS app, I want to pass props of one component to another which is neither a parent nor child of first component.How can I do that?
There is a Order>
So, reasoning is:
OrdersPage
OrdersPage
you have 2 components: Order
and OrdersViewer
OrdersPage
) is to know which order was clicked and show that in other childstate
on your OrdersPage
componentstate
as props
and show clicked component