I may be out of my depth here, but I’m a bit confused on how to structure my web app to use SSR.
I have a folder
/both, where I’m putting all my React components and pages, router, etc. I have a JS library I’m using that is strictly client-side, so I put it inside
/client/lib. But then the code in
/both gives errors because the server side is trying to reference client-only objects (in this case, for Web Audio API).
I’m mostly concerned about SEO which is why I’m using SSR. Should I just put the sales/pitch pages in
/both, and put the user dashboard and private functionality in
EDIT: Oops, no. React components in
/both cannot reference components in
/client. Ok, I’m officially lost!