I understand that Laravel is full stack (using blade earlier) now react takes over the blade. Earlier when using the blade components i had flexibility of sending the data from controller to the blade component and using that as it is. But with use of react, it appears that I'm forced to use an API connectivity than a functional call.
Why that's a concern? because
Using Blade, i didn't had to worry about security. I used laratrust and that was just good. Now using React and fetching data over API (axios), i have to again worry about the security.
too much resource burden. Earlier with blade, my controller would fire the blade with data, but now each time i need to do an API call and get the data.
I'm just worried if we're loosing the monolithic and are moving to a microservice model although the frontend and backend are packages into a single project structure. Can some please help?
@shankarnewton I’m struggling to work out just what it is you’re asking?
If a “monolith” serves your needs then just build a monolith. Microservices are a fad, 90% of projects that use them don’t need them, and they introduce as many—if not more—problems than they solve.
@martinbean True, but am more concerned about how to make it monolithic with React component. With some more reasearch, found a related question in StackOverflow link
Further, this YouTube video link looks to be closer to this request but am still validating.
but am more concerned about how to make it monolithic with React component.
@shankarnewton But again, you’ve answered that question yourself?
React is a JavaScript library. It runs in the browser. Therefore you’ll need to build an API for your React components to retrieve data from the server. And those API endpoints will require authentication and authorisation to stop people making requests for data they shouldn’t have access to.
@martinbean Yes totally agreed but am still unable to figure it out how to make it perfectly monolithic. Like blade was truly convincing but am still trying to figure that out with react (without API, but as a functional component).
A monolithic app is usually understood to be using PHP and a tiny amount of javascript to make a page work. Typically it would not have a bunch of ajax requests unless using Inertia or the like.
I think what you mean is how to integrate React with Laravel