mapseed/platform

Better state management in views

Closed this issue · 1 comments

@Lukeswart pointed out the advantages of ensuring that view render functions don't mutate state. Keeping state mutations out of render functions would make it easier to port the application to a more modularized architecture at some point in the future.

Also, state management in views is usually handled with properties attached directly to views. A better pattern, maybe, would be to create a state management model for each view, then use model events to trigger rendering when needed.

The place form view in particular, I think, violates these principles more so than other views. I'd really like to refactor the form with an eye toward robust state management.

Closing--this will be addressed in #729