Pass object through Link in react router

后端 未结 6 1174
轮回少年
轮回少年 2020-12-01 07:24

Is it possible to pass an object via Link component in react-router?

Something like:
Click <

6条回答
  •  Happy的楠姐
    2020-12-01 08:07

    This isn't possible, you need to pass something that can be stored in the URL such as a string ID. You would then use that ID to perform a lookup of the object.

提交回复
热议问题