DEV Community

Discussion on: A Really Simple Intro to localStorage in React

Collapse
 
robvirtuoso profile image
robvirtuoso

Would be good to enclose any code that has reference to localStorage in a try-catch block in case some browser misbehaves in its private browsing mode, e.g. previous versions of Safari.