Skip to content

Store dark mode preference in localStorage #228

Merged
merged 2 commits into from
Aug 2, 2021

Conversation

campb303
Copy link
Collaborator

@campb303 campb303 commented Aug 2, 2021

Added a new useStickyState hook to the utilities file and use it for dark mode.

The useStickyState hook wraps useState, useEffect and the window.localStorage API to synchronize state and localStorage values on load and change.

@campb303 campb303 linked an issue Aug 2, 2021 that may be closed by this pull request
@campb303 campb303 merged commit 8d2a727 into staging Aug 2, 2021
@campb303 campb303 deleted the feature-store-darkmode-preference branch August 2, 2021 21:05
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store User Preferences
1 participant