useStorage

A hook that utilizes the local storage API. It caches the state so that it will persist while navigating and refreshing the app.

Values

state:

The local state value

setState:

Method to set the local state

Arguments

key:

The key that get's placed in local storage

initial:

the inital value that get's passed on to state