How to pass props to React components in Laravel


One of the challenges I faced is to pass props from Laravel to React using Blade, and I’ve found a very quick workaround. Let’s suppose your react component gets an entity ID as a prop so you can load data when your component will mount, the idea here is to create a div in your Blade view which will contain the props you will be passing to your components

B logbook : PHP | Javascript | Laravel | CodeIgniter | VueJs | ReactJs | WordPress