Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

peffraimidis's avatar

peffraimidis wrote a comment+100 XP

4mos ago

The Laravel Workshop: Ep 54, The Post Item Component

I still struggle to find what the approach I should follow on components, for example, LikeButton. Here, it was switched so it could accept the entire post, which, for sure, is an option. Does it make sense, though, to keep the component "dumb" and let the parent one handle the submission of the form?

I understand the pros and cons here. I'm just wondering which approach would fit better to a real application that tests are involved: Backend, Frontend, E2E tests.