Skip to content

Commit

Permalink
Merge branch 'derived-diamond-problem' of https://github.com/TanStack…
Browse files Browse the repository at this point in the history
…/store into derived-diamond-problem
  • Loading branch information
crutchcorn committed Nov 30, 2024
2 parents 9a5d485 + 59ab2df commit 697d15e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/framework/vue/reference/functions/shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ function shallow<T>(objA, objB): boolean

## Defined in

[index.ts:43](https://github.com/TanStack/store/blob/main/packages/vue-store/src/index.ts#L43)
[index.ts:47](https://github.com/TanStack/store/blob/main/packages/vue-store/src/index.ts#L47)
44 changes: 35 additions & 9 deletions docs/framework/vue/reference/functions/usestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,54 @@ title: useStore

# Function: useStore()

## useStore(store, selector)

```ts
function useStore<TState, TSelected, TUpdater>(store, selector): Readonly<Ref<TSelected>>
function useStore<TState, TSelected>(store, selector?): Readonly<Ref<TSelected>>
```

## Type Parameters
### Type Parameters

**TState**

**TSelected** = `NoInfer`\<`TState`\>

**TUpdater** *extends* `AnyUpdater` = `AnyUpdater`

## Parameters
### Parameters

**store**: `Store`\<`TState`, `TUpdater`\>
**store**: `Store`\<`TState`, `any`\>

**selector** = `...`
**selector?**

## Returns
### Returns

`Readonly`\<`Ref`\<`TSelected`\>\>

## Defined in
### Defined in

[index.ts:12](https://github.com/TanStack/store/blob/main/packages/vue-store/src/index.ts#L12)

## useStore(store, selector)

```ts
function useStore<TState, TSelected>(store, selector?): Readonly<Ref<TSelected>>
```

### Type Parameters

**TState**

**TSelected** = `NoInfer`\<`TState`\>

### Parameters

**store**: `Derived`\<`TState`, `any`\>

**selector?**

### Returns

`Readonly`\<`Ref`\<`TSelected`\>\>

### Defined in

[index.ts:16](https://github.com/TanStack/store/blob/main/packages/vue-store/src/index.ts#L16)

0 comments on commit 697d15e

Please sign in to comment.