A hyperapp Subscriber
and Effect
to save values to and load values
from the LocalStorage space.
Very much stolen from @zaceno's Hyperapp Code-Along, I'm just putting it in a package because I don't want to copy-paste across all my projects.
See demo.html for a self-contained, well-commented example.