How does Google index sites based on JavaScript?
Officially, Google bots should be able to index any websites whether they are relying on JavaScript or not. Google announced the support of JavaScript for their bots on Webmaster Central Blog in May 2015, deprecated the Ajax crawling scheme one year later, and announced it would be abandoned in July 2018.
However, without any particular solution it usually takes days or weeks to index the dynamic content produced with JavaScript. To circumvent this limitation, it is now recommended to implement the Dynamic Rendering recommendation which supersedes the old Ajax crawling scheme specification.