Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when I you use composition api code approach in store it doesn't display any data #58

Open
alikasmou opened this issue Apr 5, 2023 · 1 comment

Comments

@alikasmou
Copy link

`import { defineStore } from "pinia";
import { computed, ref } from "vue";

export const useFormsStore = defineStore({
id: "forms-store",
state: () => {
//properties
const forms = ref();
const filters = ref();
const errors = ref({});
......`

@julisch94
Copy link

Same here :)

My example looks like this:

import { defineStore } from 'pinia'

export const useReservationForm = defineStore('reservationForm', () => {
  const data = {
    firstName: 'Joe',
    lastName: 'Doe',
    emailAddress: '',
  }

  return {
    data,
  }
})

And the displayed store in Colada stays empty:
image

If I find time, I'll see if I can contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants