@mantine-vue/store 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# @mantine-vue/store
|
|
2
|
+
|
|
3
|
+
Minimal external store primitive used internally by `@mantine-vue/modals`, `@mantine-vue/notifications`, `@mantine-vue/nprogress`, and `@mantine-vue/spotlight` to share reactive state outside of component instances.
|
|
4
|
+
|
|
5
|
+
> Mantine Vue is an independent community port of [Mantine](https://mantine.dev/) for Vue 3. It is not affiliated with or endorsed by the Mantine team.
|
|
6
|
+
|
|
7
|
+
Most consumers won't install this package directly — it comes in as a dependency of the `@mantine-vue/*` extension packages listed above. It's published standalone in case you want the same pattern for your own module-level stores.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
yarn add @mantine-vue/store
|
|
13
|
+
|
|
14
|
+
# or with npm
|
|
15
|
+
npm i @mantine-vue/store
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { createStore } from '@mantine-vue/store'
|
|
22
|
+
|
|
23
|
+
const store = createStore({ count: 0 })
|
|
24
|
+
|
|
25
|
+
store.subscribe((state) => console.log(state.count))
|
|
26
|
+
store.setState({ count: 1 })
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Peer dependencies
|
|
30
|
+
|
|
31
|
+
- `vue` ^3.5.0
|
|
32
|
+
|
|
33
|
+
## License
|
|
34
|
+
|
|
35
|
+
MIT
|