So Ionic's documentation for React is pretty limited. Solid framework, as far as I've dealt with, but poorly documented.
I cannot for the life of me figure out how to change the title dynamically. I can change the title tag in the index.html easy enough, but that's a static value shared across all "pages".
How does one go about changing the title dynamically? I'd love to be able to tailor the other meta information as well, but if I can figure out the title, I can probably figure out the other values.
I guess a separate question, but running into the same thing with Google Analytics. I've got the tag set up on index.html, but it won't render page views because users never really leave the initial page...
Ionic React uses a static
index.html, and the framework is rendered on top of that.There's no Ionic-based way to change the page title, but you can use standard JavaScript as described here, for example.
For Google Analytics, you can create your own hook that automatically pushes page changes to GA; this is one tutorial that describes how. Make sure you look for information on react-router 5, not react-router 6, as Ionic does not yet support version 6.
Alternately, you can use one of the many React GA packages.