1

We're planning to build an application using ReactJs as our frontend and laravel as our backend(REST API).

As we were doing some researches about how to integrate these two, we've encountered the library react-laravel.

Now I wanna know what are the pros and cons of using such library over vanilla react and laravel. is there any limitations or any bugs we might encounter ? will it speed up development or we might need to spend more time learning it ? will it change the react's implementation method in any way ? ...

*we're using redux and react-router.

*I'm an (almost) experienced react developer

Mani Shooshtari
  • 760
  • 1
  • 6
  • 19

2 Answers2

0

react-laravel shouldn't effect your actual React app or Laravel app much at all. The only downside is the V8js dependency, which is... not great.

I've built a small middleware called laravel-react-middleware that just does a simple HTTP request from your PHP server to your Node app. So you can write your React server-side rendering using Node and send the compiled HTML back to your PHP app. It can pass back a simple JSON object as well, so if you're using something like React Helmet for managing meta tags and document titles, then you can pass that data back into your Blade view.

Brad
  • 1,880
  • 1
  • 12
  • 18
-1

I did not use react-laravel personally, however the different I see about it is the pre-rendering for the component.

However, on a personal preference, I would not tie my application to a third party component that is not controlled by any of the two entities. Also, any pre-rendering you would like to do, can be done easily, and you should have full control on what runs at client-side, and what runs on server-side.

Mina Abadir
  • 2,951
  • 2
  • 15
  • 20