Sep 25, 2024
6
Level 4
Can you use react compnents in a blade view?
Question says it all, can I use react compnents in inertia in a blade view? thanks
Level 28
@Cushty I've used Vue components as "web components" in standard blade files, but the same applies to React. You can define a React component as a custom element in HTML.
This is useful when you want to place just one or a few elements on a page, rather than using a JavaScript framework for the entire page. This makes sense if your components are quite complex and you don't want to use plain JavaScript or lightweight frameworks like Alpine.js.
More details: https://legacy.reactjs.org/docs/web-components.html
Please or to participate in this conversation.