Menu

Post image 1
Post image 2
1 / 2
0

How to build a reactive SPA without writing a single line of React or Vue. Part #2

DEV Community·Matt Mochalkin·about 1 month ago
#UrCaNihO
#symfony#php#fullstack#html#task#board
Reading 0:00
15s threshold

In Part 1 of this series, we explored the “HTML-over-the-wire” philosophy and successfully scaffolded a beautiful, albeit static, Kanban board using Symfony 7.4, Twig and Tailwind CSS. We avoided the “JavaScript Tax” by relying on AssetMapper instead of Webpack and we leveraged PHP 8.3 Backed Enums to keep our domain model strictly typed. Now, we face the core challenge - How do we make this static board interactive? How do we allow users to drag and drop cards and crucially, how do we make those changes reflect instantly on the screens of every other user viewing the board? If we were using React, this is where we would typically reach for a heavy library like react-beautiful-dnd , set up a complex Redux store or context provider to manage the optimistic state and write custom WebSocket connection logic to handle real-time events. With Symfony UX, we take a radically simpler, standards-based approach: Stimulus: A tiny JavaScript framework designed to augment your HTML.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More