colada icon indicating copy to clipboard operation
colada copied to clipboard

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

Open alikasmou opened this issue 2 years ago • 1 comments

`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({}); ......`

alikasmou avatar Apr 05 '23 17:04 alikasmou

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.

julisch94 avatar Oct 14 '23 13:10 julisch94