Best practice for using the Route for storing state
Given a page
/items
/items
which has a grid of the available items fetched from the api, I want a modal for adding/creating a new item. I would like to make the modal appearance (including transitions, if possible) dependent on the route. The modal should show when the url is
/items/create
/items/create
, and don't show when the url is just
/items
/items
.
I looked for a solution, but - maybe because of wrong search terms - found no nice and clean solution. Are there any best practices for this?