3 ms·
Build a router and set inner HTML. This would maybe be a few hours of work if going from a static site to a SPA was actually in scope. Strip headers from the c
by jpc0 2y ago
Build a router and set inner HTML.
This would maybe be a few hours of work if going from a static site to a SPA was actually in scope. Strip headers from the current pages and now serve the body as content from an API.
You don't need your entire site to be built with react to use react within your site and building a JS based router is not very difficult and will get even easier if the Navigation API[1] becomes better supported.
This would actually be harder if you now still need a static site with an across page assistant. I would probably push back on some requirements and store state locally in the browser. Effectively hot reload the assistant on each navigation but even then it's doable, even using react.
1. https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api https://html.spec.whatwg.org/multipage/nav-history-apis.html...