It wasn’t until this project that it dawned on me - AJAX and MVC do not really flow together, at all. My “Chorizo” app was routing to very different views practically every click event, whereas AJAX was looking for a single view that it could update as needed. Once this “single page app” mentality clicked, the rest started to flow.
I began to add AJAX requests into the app on a smaller scale, not expecting the app to flow dynamically on a grander scale. For example, my chores#show route was an established view - adding a “Next Chore” click event to this view and dynamically rendering the “next chore” was easily doable without having to re-work my entire app. A code snippet below walks through the process:
As I understand it, the next sections (React and Redux) will continue with this “single page app” mentality, and “updating state” will become second nature. It sounds like “Chorizo” has a major face-lift in it’s future!