📅  最后修改于: 2022-03-11 15:01:46.093000             🧑  作者: Mango
// React Router v6:
// interpolates set of params into a route path string
// with ':id' & '*' placeholders.
generatePath('/users/:id', { id: 42 });
// --> '/users/42'
generatePath('/files/:type/*', {
type: 'img',
'*': 'cat.jpg'
})
// --> '/files/img/cat.jpg'