Skip to content

Commit

Permalink
docs: added store example
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Nov 27, 2021
1 parent 599db50 commit b9bb82f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/content/examples/ui-libraries.md
@@ -1,7 +1,7 @@
---
title: Popular UI Libraries
description: Validating popular Vue.js UI libraries with examples
order: 8
order: 9
---

# Validating UI Libraries Examples
Expand Down
18 changes: 18 additions & 0 deletions docs/content/examples/using-stores.md
@@ -0,0 +1,18 @@
---
title: State Stores
description: using vee-validate with state stores
order: 8
new: true
---

# Stores

If you want to integrate vee-validate with state management solutions you can do that with the composition API.

## Pinia

[Pinia](https://pinia.esm.dev/) is a data store for Vue.js and it is the recommended solution to your Vue.js state management.

The example integrates a form state into the store by syncing it using `watch`. It also integrates the `registerUser` action to be used as a submit handler for the form.

<code-sandbox id="vee-validate-pinia-3mebq" title="vee-validate pinia example"></code-sandbox>

0 comments on commit b9bb82f

Please sign in to comment.