5
7 Comments

Laravel and React

I am looking to build a social media style application.

I know most people use vue with Laravel but does anyone use Reacts with Laravel?

Any issues? Or is Vue just easier to use with Laravel?

I am sure I can get by wit using jquery and ajax for the front end but why not use the new stuff right?

Thanks in advance

on July 6, 2021
  1. 1

    I use React with Laravel on one of my projects.
    I went through 2 iterations.

    First, I added React to my Laravel app just like you might do with Vue. (I wrote an article about how to do this https://joeczubiak.com/laravel-plus-react/)

    Second, I switched it to a Next.js frontend with Laravel backend and put them in their own repos.

    In the first iteration, I had problems with load times because Laravel is not really setup to do React SSR so the react components take longer to load on page loads. Also, when I had React as a dependency, running npm install on the server would stall the server and it was a major headache.

    Using Laravel with Next.js has had no issues and I like having the front and backend decoupled.

  2. 1

    At work, we use Next.js for client and Laravel as an API.

  3. 1

    Hello Mike,
    I Have the skill what are you looking for please share your requirement would be glad to assist you.
    You can reach me at bellastone[dot]tis[at]gmail.com
    Skype- live:bellastone_5

  4. 1

    Hi Mike! I have used React with Laravel no problem. Do you have any specific concerns? I'd be interested in hearing more about your specific use case!

  5. 0

    I would suggest a JS backend to match your frontend. At first it seems like it's not really necessary but having your whole codebase written in one language and even framework is fantastic. I was a PHP developer for years. Now it's only React, front and back, and Firebase in most cases for database and auth and storage. I suggest you try it once before switching stacks.

    1. 1

      Thanks but I am currently a PHP Developer but I know Laravel and a little of ReactJS.

      I used React and Firebase before.
      I want to create a Social Network like application. Seems like laravel would be nice to use as the api/backend and use a js framework like vue/react/etc as the front end.

      I mean I could get by with using jquery and ajax but why not use new tech?