DEV Community

Jacob Henning
Jacob Henning

Posted on • Updated on

Comparing React to Vue on a Laravel API

Initial Review

Being familiar with React and Vue, I set out to resolve the rivalry. Not for anyone here, it was mainly for myself, but I figured I'd write and post a blog about it anyways. I also was going to strike a different style for each website.

Vue Style

For Vue I used the component template format. I also used two-way binding for the state.

React Style

For React I used the render function and of course I had to use one-way binding as React doesn't support two-way binding.

Shared Style

Both of these apps were built on identical Laravel backends with identical bootstrap themes. They both initiated with a render function. The entire app was rendered as one component. This component held most of the state.

Comparison

The react and vue sites both worked seamlessly. However, I did find that Vue was easier to design, and React was easier to program. This was likely due to a the template vs render function approach. I also noticed that the Vue site loaded slightly quicker. This was due to the size of each library. There wasn't a significant difference in the end.

Who won?

Well, I'm not entirely sure which website I prefer. They both work fairly well. I could code both of them again. If anything, this experiment simply proved that react and vue are nearly identical on small scale SPAs. I suppose I'll have to build a second experiment to really get to the bottom of this. Feel free to check my progress on my website

Top comments (0)