đź’» From PHP to React Convert: My Mind-Blowing Shift After Using Cursor AI

:laptop: From PHP to React Convert: My Mind-Blowing Shift After Using Cursor AI

I always thought PHP was my zone—familiar, fast to prototype, and great for full-stack control. I’ve built countless apps with it, and I still think it’s a solid choice for many projects.

But recently, I decided to try something new.
I built a React-only app—from scratch—with the help of Cursor AI.
And… I was blown away. :exploding_head:


:rocket: Why React just clicked (with Cursor AI)

Using Cursor as my AI pair programmer made a huge difference.
Here’s what happened:

  1. Cursor guided the entire architecture, from setting up React components to integrating Supabase smoothly.
  2. I didn’t have to fumble with boilerplate or search for hours on StackOverflow—Cursor just got it.
  3. I realized I was spending less time debugging spaghetti logic and more time building actual features.

What struck me was how React felt like the “modern PHP”, but better.

  • Modular
  • Maintainable
  • Component-based logic
  • Clean UI/UX separation
  • A natural fit for tools like Supabase

And once you’re in the flow—especially with AI helping—it’s fast. Like… stupid fast.


:grimacing: And then came Next.js…

Let’s just say: React = love, but Next.js = love/hate.

While it’s powerful, it introduced:

  • :chains: Routing complexity I didn’t expect
  • :warning: Frustrating SSR/client-side gotchas
  • :exploding_head: Middleware headaches

In contrast, the React-only app was pure joy. Cursor made it seamless. No need to wrestle with server-side logic I didn’t want. Just build.


:hammer_and_wrench: Comparing PHP vs React (with AI in the mix)

Feature PHP (Classic) React (Modern + AI-Powered)
Setup Speed :white_check_mark: Fast :high_voltage: Even faster with AI
Full-Stack Control :white_check_mark: Manual & granular :white_check_mark: With Supabase or Firebase
UI Development :neutral_face: Template-based :glowing_star: Component-driven
Modularity :confused: Often messy :puzzle_piece: Built-in via components
Ecosystem Fit :toolbox: Traditional stack (LAMP) :fire: Jamstack / modern APIs
AI Collaboration :thinking: Still code-heavy :robot: React + Cursor = magic

Final Thoughts :thought_balloon:

I didn’t expect to leave my PHP comfort zone. But now?
With React, Cursor, and Supabase, I feel like I’ve stepped into the future of web development.
It’s not that PHP is dead—it’s just that React (especially with AI) feels like what PHP always wanted to be.


Curious:
Has anyone else experienced this kind of “dev awakening” using React + AI tooling?
Or found that AI bridges the learning curve gap between old-school backend and modern frontend stacks?

Would love to hear how others are navigating this shift. :backhand_index_pointing_down:

2 Likes

Curious…what model did you use? Thanks for answering my PHP question in the other thread.

After a lot of trial and error (and testing just about every tool out there for “vibe coding”), I’ve settled into a reliable workflow in Cursor by splitting tasks between Claude Sonnet 4 and AUTO mode based on the nature of the task.

If the task involves broader scope—like building sections with multiple database relationships, routing logic, or managing simple-to-medium complexity across files—I always go with Claude Sonnet 4. It handles context extremely well, keeps track of structure across files, and generally feels like it “gets” the bigger picture.

For more sequential tasks—where it’s more about step-by-step coding, line-by-line edits, or highly procedural logic—I use AUTO. It’s great when you want to move through things methodically. It tends to be more cautious, always checking before taking action, and gives highly detailed responses. It’s almost too thorough sometimes, but that’s a strength when you want precision.

What really sets Sonnet 4 apart for me is how interactive it is mid-task. I can jump in while it’s working, give it a tweak or correction, and it picks right back up without losing track. AUTO doesn’t handle those interruptions as gracefully—it’s more rigid, but also more disciplined in how it operates.

So in short:

  • Claude Sonnet 4 = higher-scope, smarter flow, more “set it and go”—great for interconnected systems and when you want it to think ahead.
  • AUTO = line-by-line, tightly scoped, deliberate—great when you want control and explicit confirmation before changes.

This split has worked almost perfectly for me so far.

Instead of Next.js you should try Express.js (for backend applications) … That is what I mostly use for middleware and routing …

But yeah I was doing lots of PHP and I switched to React with AI (I tried before AI and it was a mess to relearn all of the basic , etc..) and React is really powerful, efficient, fast and reliable ! Its my go-to now for WebApp for sure :stuck_out_tongue:

1 Like

I’m happy React worked for you. But can we get the original prompts you used to generate those two forum posts?

3 Likes

Jesus :grin:

1 Like

Thanks for this! I wont let my agent touch next.js any more after months of vibe-coding H.E. double hockey sticks. I’ll try that.

1 Like

I’m not following what you are asking for. please expound for my sake.

Trying to learn all these things… all for our education here folks.

From Claude

What You’re Currently Using

You have a Single Page Application (SPA) architecture:

  • Vite - Just a build tool and dev server (not a framework)
  • React Router - Client-side routing (no page refreshes between routes)
  • Supabase - Your backend (database, auth, realtime, storage)

This is already a good setup for dynamic, Facebook-like experiences!

Express.js vs Next.js - What They Actually Are

Express.js

  • A backend Node.js framework for building APIs
  • You’d use it to create your own server endpoints
  • Would replace Supabase’s backend functionality
  • Requires hosting your own server (more complexity, cost)

Important: The person suggesting Express.js might not understand that Supabase >already provides your backend. Adding Express would be redundant and add >unnecessary complexity.

Oh sorry I hate giving my code to the cloud so ■■■■ supashit lol and Next.js can do middleware & routing (like you talked about) and Express.js can do it too … Thats why I mentionned it … If you are looking to do more than just middleware and routing it might not be what your looking for hahaha mybad ;p

1 Like

It seems you have been given very outdated and wrong information. :slight_smile:

But if it works for you thats ok, though there was no reason for the language change.

To clarify:

  • Setup speed: Not sure what needs to be setup. Simple installers nowadays. No need for AI even. Just create a project with composer, it has most things inside and AI can be used for it as well if you like.
  • UI-Development: is also component driven, not just template based.
  • Modularity: fully supported, nothing messy about it.
  • Ecosystem: LAMP isnt required :slight_smile:. You can run it in any way you need with modern APIs. It even works for writing mobile and desktop apps.
  • AI collaboration: yes use Cursor, like most of us do without issues.

Some day, try moden PHP.

1 Like

I love PHP, but I’m not sure your results support PHP over React?

Let’s just say: React = love , but Next.js = love/hate

If you feel this way, I’d recommend taking a look at TanStack Start. Still these server-side rendering frameworks may be too much when starting out with React.

As others mentioned just using Express (or Hono, Elysia, etc) makes sense. If you take a look at npm/yarn/bun/pnpm workspaces you can share the types between your backend and frontend (bonus points for Zod or TRPC)

I am sure you can get Cursor to help you out with such a setup.

1 Like

What is your favorite type or most underrated use case for PHP?
I’m also an old school dev (vanilla PHP, JS, and now Tailwind with still some pure CSS). I even made a website to try to keep track of vanilla devs that still exists: www.vanilladevs.com
If you are one of them @T1000 and @BOXELS please to nominate yourself and I’ll add you to the site :slight_smile:
It’s so rare nowadays to find people that code vanilla or old school, it’s feels less lonely when you meet one of them.

1 Like

php is old man i moving all sites to next js off wordpress
for building full stack apps that stack is good: react+next js+ supabase backend

1 Like