I’m thinking about using Next.js for my backend. But I’m worried about being locked into React for the frontend. Frontend tech changes so fast these days.
What if React becomes outdated like AngularJS did? Would I have to redo both my frontend and backend? That sounds like a lot of work.
Is it better to use Next.js just as a proxy to a separate backend? Or is there a way to keep my options open for future frontend changes?
I’d love to hear what others think about this. Have you faced similar challenges? How did you handle it?
As someone who’s worked extensively with Next.js, I can assure you that it’s quite flexible. While Next.js is optimized for React, it’s not strictly tied to it. You can use Next.js as an API backend and pair it with any frontend technology you prefer.
I’ve successfully implemented projects where Next.js served as the backend, handling API routes and server-side logic, while the frontend was built with Vue.js. This approach allows you to leverage Next.js’s powerful features like API routes and serverless functions without committing entirely to React.
Moreover, Next.js’s API routes can function independently of the frontend, making it easier to switch frontend technologies in the future if needed. This decoupling strategy has saved me countless hours in long-term project maintenance.
Remember, the key is to maintain a clear separation of concerns between your frontend and backend logic. This way, you’re not putting all your eggs in one basket and can adapt more easily to future tech changes.
hey there! i’ve used next.js as a backend with vue frontend before. works great! just use the api routes feature and treat it like any other backend. keeps things flexible for future changes. dont worry too much bout being locked in, next.js is pretty versatile
hey there! have u considered using next.js api routes with a different frontend? it’s pretty cool! i’ve tried it with svelte and it worked great. keeps your options open for the future. what frontend tech are you most interested in? maybe we could brainstorm some ideas?