Hacker News new | ask | show | jobs
by krschacht 532 days ago
It’s really a different mindset shift. In react, you think about components — updating components and replacing one component with a new component. But in hotwire, you think about pages. First implement everything as full page transitions. Only after you get all your functionality working with full page transitions, then you do a pass back through it and ask: how can I minimize the amount that changed between the transition from this page to that page? “Oh, just wrap this part in a turbo frame or have this one controller action reply with a turbo stream in this one case.”

I don’t know if that’s helpful, but realizing that I needed to shift from thinking about components to pages was the a-ha when Hotwire all started making sense.