· 11 min read
HTMx - tutorial part IV - Updating other parts of the application
This is the fourth post in a series that I’m making about HTMx that I think is utterly amazing and will change how I (we?) write web apps in the future. You are more than welcome to read from here, but it will be hard following along code-wise if you haven’t stepped through part I, part II and part III first.
In the last part we built out most the actual application, which means that we are left with the fun part here. There’s one section of the application that is not working yet - the footer. In the footer I wanted to show a tally of the number of items, the number of completed items, and also the number of late items.
Keeping track of numbers like that can be a bit messy since we need to update them when we are doing other actions, like adding, deleting or simply when time has passed.
HTMx has a few different strategies to handle this and I wanted to show you two.