I'm trying to create something like here on stackoverflow:
When I enter this URL:
https://stackoverflow.com/questions/70615440
it will update the url to:
https://stackoverflow.com/questions/70615440/refactor-switch-statement-to-reduce-code-complexity
The url is possible to visit by id. It will add / update the slug to the url. I can also use the a random slug https://stackoverflow.com/questions/70615440/xxx and it will update it to the correct one :https://stackoverflow.com/questions/70615440/refactor-switch-statement-to-reduce-code-complexity
xenForo does something similar:
https://xenforo.com/community/threads/200874/
https://xenforo.com/community/threads/xenforo-2-2-8-patch-1-and-add-on-updates-released.200874/
How can I achieve something like this in a React app? How is that behavior called?