Skip to content

useStore

A React hook that returns the valdres store from the closest <ValdresStore /> or in the case of no parent <ValdresStore /> it will return the default store.

import { useStore } from "react-valdres"
 
const Component = () => {
    const store = useStore()
    return <div></div>
}