# useStore

Signature
`useStore(): Store`

valdres-solid
Access the current store instance

Returns the current valdres store from the nearest `ValdresProvider`. Useful for imperative operations.

## Usage

```tsx
import { useStore } from "valdres-solid"

function Debug() {
    const store = useStore()

    const handleClick = () => {
        console.log("Current:", store.get(myAtom))
    }

    return <button onClick={handleClick}>Log value</button>
}
```

## See also

- [ValdresProvider](https://valdres.dev/solid/ValdresProvider) — provide a store to the component tree
- [store](https://valdres.dev/valdres/store) — create a store instance
