I was working on a single page application in react.js, so what is the best way to update meta tags on page transitions or browser back/forward?
As create-react-app docs mentioned:
If you need to dynamically update the page title based on the content, you can use the browser document.title API. For more complex scenarios when you want to change the title from React components, you can use React Helmet, a third party library.
A simple example:
function App(){
document.title = "Home";
return (
...
)
}