by funerr on 10/17/24, 4:14 AM with 9 comments
by bbor on 10/17/24, 4:29 AM
Also, obviously, you should only do this if you have a really solid architectural vision for separating concerns; any requests that need to hit python naturally loose all of Next’s fancy optimizations for server<->client data passing, other than basic caching I guess. If you just want react itself, I’m pretty sure there are less framework/resource intensive ways to deliver SPAs and cut out the node server altogether - but that’s something of a guess.
Best of luck! The hardest part is remembering to switch between typescriptSyntax and python_syntax ;)
by cdaringe on 10/17/24, 3:06 PM
by aosaigh on 10/17/24, 9:35 PM
I find the full-stack-in-one-codebase approach that Next.js takes very hard to work with. It becomes hard to know what is "frontend" and what is "backend". Mixing server-side components with client-side components is a mess. So I stick to a traditional SPA approach: front-end static site and back-end REST API server.
by siamese_puff on 10/18/24, 3:18 AM
Bundle the client and serve it from Python. Use Python for APIs that you call from the client. You can bundle a server and client bundle optimally, do SSR within Python and hydrate the client with the client bundle.
by aristofun on 10/17/24, 7:25 PM
by datadrivenangel on 10/17/24, 1:33 PM
by Raed667 on 10/17/24, 10:24 AM
Do you care about SEO & serve-side features ? If you already have a backend with Python, then maybe Next.js is redundant