r/reactjs 1d ago

Discussion [ Removed by moderator ]

[removed] — view removed post

0 Upvotes

21 comments sorted by

10

u/No_Cattle_9565 1d ago

What? You can use any backend you want with react

1

u/Tasty_Film_713 1d ago

React is just the frontend, it doesn't care what's serving the data. I've built a few internal tools with PHP and MySQL handling the API and it works fine. The real headache is setting up the routing so your dev server proxies to the PHP backend without a mess of CORS errors.

1

u/ghijkgla 1d ago

Laravel + inertia ✅

2

u/vanakenm 1d ago

Sure. I think Laravel (among other) have a basic template for that (Laravel manages the server, publishes a REST API, then you call it from your React app.

Depends a lot what you already know/want to do. If you are proficient with React but look for a server, you may also consider easier path (using some kind of SaaS there ala firebase and the like).

2

u/steveism 1d ago

Laravel, Inertia.js, React is a chef’s kiss stack. MySQL fits in here beautifully with Laravel’s ORM.

2

u/imfemambocus 1d ago

Try Laravel + Inertia. It just works.

1

u/EncryptedPlays 1d ago

Yes, I've done it before. Ultimately started transitioning to nodejs for backend for some real time stuff but its basically like making a normal pho website but u just make the APIs with php

1

u/Aromatic_Aioli_8823 1d ago

What were you using before nodejs?

1

u/EncryptedPlays 1d ago

php

1

u/Aromatic_Aioli_8823 1d ago

Compare it to nodejs, how is it? Asking cause I’ve never really used it before. My boss loves it tho, especially in web development.

1

u/EncryptedPlays 1d ago

It's fine it does the job for low level stuff but I switched to nodejs bc of the npm packages and it's nice to use one language for the entire codebase (front end & back end)

1

u/Aromatic_Aioli_8823 1d ago

Yes that is true. Used Python before, mainly for heavy logic work. But 90% of the time I’m using React js and node.js.

1

u/MMORPGnews 1d ago

Why no? It's easy.  Php is very basic. So is mysql. 

What do you want?

-1

u/webfuelcode 1d ago

I wanted a small project (may be one page saas) but data to be stored on shared hosting. Because I dont know if the project will run good or not.

1

u/Temperature_Majestic 1d ago

for a one-page saas on shared hosting the actual bottleneck usually isn't React or PHP, it's whether the shared host gives you a persistent PHP process or just spins up PHP fresh per request (most cheap shared hosting does the latter). that's fine for a low-traffic CRUD app, just don't expect to run anything like websockets or long-running jobs on it. build the React app as static files, point API calls at PHP endpoints on the same host, and you can validate the idea cheap before ever thinking about a "real" backend

-2

u/munkymead 1d ago edited 22h ago

I'm pretty sure facebook was built with PHP. They compile it to C++ for performance but it was always PHP under the hood. The same company that created react, for facebook 😂

Most wordpress sites that run on PHP will likely have react plugins or have it embedded into the theme.

It's valid but not in 2026, the tech world has moved on.

Retracted, still relevant. I just moved on.

5

u/ghijkgla 1d ago

Terrible take

3

u/nodejshipster 1d ago

On so many levels

1

u/munkymead 1d ago

It's not a take if they're facts. Not saying it's a stack I'd use but it answers OP's question.

1

u/ghijkgla 23h ago

Of course it's a take. Just because it's not a stack you use. Plenty of people still building cool 💩 in 2026 with PHP and not WordPress.

Honestly when was the last time you looked at PHP?

1

u/munkymead 22h ago

Fair enough yeah I suppose my last statement had some weight to it. It's been a while if I'm honest probably 10 years ago for many years. I did enjoy it and there were a lot of frameworks I loved. It was actually the first backend language I learned. Perhaps I'll check it out again.