Ask HN: Next.js and Python Backend?
1–10 of 10 posts
Re: Ask HN: Next.js and Python Backend?
#2Also, 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 serverclient 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 ;)
Re: Ask HN: Next.js and Python Backend?
#3Do you care about SEO & serve-side features ? If you already have a backend with Python, then maybe Next.js is redundant
Re: Ask HN: Next.js and Python Backend?
#4Re: Ask HN: Next.js and Python Backend?
#5Re: Ask HN: Next.js and Python Backend?
#6Using next strictly for the front-end feels like a slight miss. It works fine to do so, but its strong suit is being a full stack react framework. If your app needs a server and you opt out of next, you sacrifice the common config model, isomorphic pages and data loading patterns, integrated api routes, optimized route/path browser bundles, …more. I get that folks like python, but if you’re already paying the cost of…
- Next does a good job as a React framework (ie CRA alternative) - Next does a great job with code bundling and splitting out of the box - Next's static build system makes it easy to query your backend statically at build time to generate things like blogs, SEO pages, etc.
Re: Ask HN: Next.js and Python Backend?
#7Re: Ask HN: Next.js and Python Backend?
#8I 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.
Re: Ask HN: Next.js and Python Backend?
#9Using next strictly for the front-end feels like a slight miss. It works fine to do so, but its strong suit is being a full stack react framework. If your app needs a server and you opt out of next, you sacrifice the common config model, isomorphic pages and data loading patterns, integrated api routes, optimized route/path browser bundles, …more. I get that folks like python, but if you’re already paying the cost of…
Re: Ask HN: Next.js and Python Backend?
#10Bundle 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.