Skip to content

useUiStore ​

Simple store for UI related states. Mainly implements the snackbar shown on multiple screens / actions

📄 View source on GitHub

Used by ​

State ​

NameTypeDescription
snackbarrefHolds the current snackbar Information

Actions ​

persist ​

Persists the state of the store to local storage. This function is a wrapper around the persistState function from usePersistentStore. It should be called after making changes to the store state.

showSnackbar ​

Shows the snackbar with the given message and color. Persists the state after showing and hides the snackbar after the given timeout.

Released under the MIT License.