faustbrian / livewired

Reusable components for @livewire applications
Mozilla Public License 2.0
12 stars 3 forks source link

Convert to Traits? #1

Open tanthammar opened 4 years ago

tanthammar commented 4 years ago

It would be great if the component could be traits instead of classes, it would be easier to integrate with other packages. I am especially thinking of an integration with https://github.com/kdion4891/laravel-livewire-forms Then I could use that package to create the necessary form fields needed for these components.

It would be great if you could figure this out with the creator of that package. I posted the same question on that repo :) https://github.com/kdion4891/laravel-livewire-forms/issues/2

faustbrian commented 4 years ago

I think it would make more sense for that package to expose its behaviour through traits because it augments the capabilities of any component while the components in this package serve a very specific use-case as stated in the README.

All components in this package have been extracted from real-world production applications and have been designed to be as flexible as possible to achieve maximum reusability. Each component is broken down into multiple methods that can be overwritten each on their own to overwrite specific parts without having to overwrite or reimplement everything.

That being said there will still be times where you will be better off to reimplement a component on your own as all of these components are extracted from real-world production applications which means major changes to their behavior are unlikely to be merged into this package.

tanthammar commented 4 years ago

Thank You for taking the time to answer :) I do understand.