I asked about mixing Laravel Blade with React. I was told I should not do it and it’s not recommended, and that also it’s hard to maintain. But then I came across the official React docs that say:
React has been designed from the start for gradual adoption, and you can use as little or as much React as you need. Perhaps you only want to add some “sprinkles of interactivity” to an existing page. React components are a great way to do that.
The majority of websites aren’t, and don’t need to be, single-page apps
And this is exactly what I was looking for – so how come no one gave me this link? I don’t want an SPA, and I said it. And you mentioned Inertia – which is still another form of SPA.
But according to React docs – it’s a very valid option – to “sprinkle” components wherever you need. Why should I not do it inside Laravel Blade then, if I don’t want an SPA and I mostly write with Blade? I still can’t understand why I asked it about 4 times (in different forums) and no one ever suggested me what the official docs just wrote? What am I missing? I really want to know if it’s something really bad to do before I start it
Permanent link to this post here