kolpage / RailroadInk-Oct2019

First repo for Railroad Ink development
GNU General Public License v3.0
2 stars 0 forks source link

Views have too much business logic in them #21

Open mklams opened 4 years ago

mklams commented 4 years ago

The front end only really consists of views and models which leads to a lot of business logic ending up in the views. For example, Board.tsx has different event handles for when tiles are added or removed from the board and these handles both makes changes to models and update the state. The views should really only be updating their state and a presenter should handle updating models and the sending those updates to the view.