Persisting DB to localStorage