TL;DR: I need a way to export static page with client-side React components, without loosing ability to make changes, to be embedded into PHP
I have a side gig for a small, mostly static landing page, and I haven’t done this kind of job for years—static HTML without a backend on my part that is. I have chosen Next.js because I’m quite familiar with it, but I need to export my landing page so someone else down the line can inject it into a PHP framework or something similar. output: "export"
does mostly what I need, but here’s the catch—I have a couple of client-side components. No fetching, just slideshows and carousel type of stuff. I need a way for someone else to hydrate these components to make them interactive and have the ability to make small HTML changes if needed. It’s like in the olden days when jQuery just attached itself to a server-side rendered component and made it work. I suspect i need to drop data-driven React for this kind of job, but maybe i can, somehow, include template into HTML itself and expose JSON that feeds it, right into HTML. Any other suggestions will be much appreciated