Part 2: Transportodon
What if there's more state in localStorage that will fit in a URL, or what if we would like to backup the state
of our data in the app? Let's add a feature to export the data in localStorage as a file that can be downloaded
and that can also be imported back into the app on the same or different browser (or computer) to repopulate the
app's state from the file's data.
TODO
There are // TODO comments in the javascript to guide you in your way while you add these
features:
- Modify the existing
Export button so that it downloads a JSON file that encodes all of the todo
items currently stored in localStorage.
- Modify the existing
Import button so that it causes the file selected in the file field
to be read and to populate localStorage with
the items read from the file