View Source
For all but the simplest cases, we will want to use some sort of Effect to manage our state
Pages and update functions can run side effects before rendering. Here we add a Reader (TVar Int) to track the count. Notice that the current count now persists after a browser refresh
Instead of a TVar, you might use a database, or some other external effect
7