I have this use case:
- User navigate to
/books/createwhich displays a form to create a book - User fills the from and submits the form
- In case of a successful submit, the user gets redirected to
/books/:idand a success message is shown at the top.
Now, I'm not sure how to show the success message and make sure it's only shown once. E.g. it shouldn't appear again when page is refreshed.
I'm thinking about using sessionStorage or just simply redirect to /books/:id?success=true and then somehow omit the success query param.
What do you think? Are there existing solutions that solve this problem?