Current handling (localStorage[0], localStorage.length) is fairly brittle. Update with more unique keys than "city" and "state" and make sure the conditional rendering is contingent on the existence of values in those keys, rather than the length of localStorage.
Current handling (
localStorage[0]
,localStorage.length
) is fairly brittle. Update with more unique keys than "city" and "state" and make sure the conditional rendering is contingent on the existence of values in those keys, rather than the length of localStorage.