Consul Service Mesh and SPAs (React)

Curious how to get Service Mesh to work for Single-Page Apps (SPA), specifically React. I managed to get the generated URL passed in via the Nomad env block, but the generated URL is referencing localhost and the browser running the React code obviously can’t talk to localhost. I am assuming the Dashcount example is doing Server-Side Rendering (SSR) and therefore gets around this issue. How is this supposed to work with SPAs?