react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

Accept a `To` from `react-router` in `useRedirect`

Open erwanMarmelab opened this issue 1 year ago • 0 comments

Problem

Sometimes, you’d like to pass a state when redirecting. However the redirect only accept a string.

Solution

Change the redirect and RedirectToFunction functions signature to accept a To from react-router

Todo

  • [?] Accept the right props
  • [x] Add a story
  • [ ] Document it

erwanMarmelab avatar May 10 '24 17:05 erwanMarmelab