Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi,

just the other day I was wondering what happened to older Javascript frameworks like Backbone.

Can you elaborate why you moved from Backbone to React / Redux? As of what I recall, Backbone was extremely stable and a lot of companies used it in very heavy web apps as well.

Since, the 2D board games of the type on your site doesn't seem to require heavy front-end lifting (I might be completely wrong here), I'm curious to know the reason behind switching to a newer technology which is still riding the hype wave.

Thanks. And of course, the site is very nice. Will be sharing it with my colleagues for our Friday online hangouts!



Good question. Both Backbone and React provide a way to build UI components. React Components are way easier for:

1. Having nested DOM elements in your components. Backbone really wanted you to just have one element per component, and then use jQuery to add children as needed.

2. Adding event handlers and other HTML attributes. JSX syntax means you can basically write HTML in your JS file. Backbone made you add event handlers manually.

3. Nested components. React lets the parent simply specify what children it wants and React automatically creates/reuses/destroys component instances for you. This was all manual in Backbone.

The bigger advantage though, is how the state is typically organized in React apps.

In Backbone, app state was sprinkled throughout the component hierarchy, and often you would have do event spaghetti up and down the hierarchy to update some state held by another component.

Typical React apps use a state container like Redux, the UI is "projected" from the state, and components just send changes to the state, aka "unidirectional data flow".

That said, React is not the best for games. Maintaining 60 fps can be difficult and we've done some fairly heavy optimization to try to keep it smooth.


Thanks a lot for the detailed reply!

Have you see SvelteJs? Would that be better suited in this scenario?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: