przemekhernik / footmate.pro

Other
11 stars 0 forks source link

Blade components support #28

Open luveqz opened 1 month ago

luveqz commented 1 month ago

Hi. I wanted to create a reusable modal.blade.php component that encapsulates JS logic and markup. I made a slot for the actual content of the modal, so instead of

@include('partials.modal', ['slot' => '<strong>markup content</strong>'])

it would look like this:

<x-modal>
  <strong>markup content</strong>
<x-modal>

The thing is, when I try to use the component syntax, now WordPress throws an error. I've been following your tutorial series, but I'm not sure what's causing this error.

Have you been able to use the component syntax on your Laravel + WordPress boilerplate?

--

By the way: thank you so much for your pro-level content (:

przemekhernik commented 1 month ago

Hi @luveqz and thanks for this contribution 🎉 I must admit that I barely used such syntax since I approached component-driven development in WordPress a little bit differently, but that's perfect that you asked for this. I'm working on material that perfectly matches your question so I think I'll be able to check and provide an update soon 🤞