|
|
|
|
|
by ajeet_dhaliwal
3058 days ago
|
|
I have wanted to try creating a game with ES6 and React for a while but been too busy recently. Thanks for this, it's great to see your attempt, I think it plays and looks great. Any unexpected challenges or issues experienced when using React for this? (I am experienced with React, just haven't used it for games, I also have experience creating games, just not with React). |
|
It's nice that react is just a view library, so you are free to choose the rest of your stack to best suit your app (i.e. a game).
The only thing I would point out is that you should use immutable data structures, so that you don't re-render parts of your view unnecessarily. There are ways to handle this without immutable data structures (i.e. componentShouldUpdate), but it's more of a pain IMHO.