Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

fix: [Vue warn]: toRefs() expects a reactive object but received a plain one.Β #555

@thisVioletHydra

Description

@thisVioletHydra

πŸ› The bug
What isn't working? Describe what the bug is.

πŸ› οΈ To reproduce
Steps to reproduce the behavior:

run nuxt
add https://pinia.esm.dev/ssr/nuxt.html
import store like

<!-- SCRIPT -->
<script lang="ts">
  import { defineComponent } from '@nuxtjs/composition-api'; 
  import { useStore } from "~/store/main";

  export default defineComponent({
    name: 'Count',
    props: {},
     setup() {
        const store = useStore();
        return { store };
    }
  });
</script>
<!-- - ⚑ - -->

store:

import { defineStore } from 'pinia';

export const useStore = defineStore('companiesInfo', {
  state: () => ({
    data: {test: 1},
  }),
});

I'd be very grateful for a link to a gist or repo that reproduces the bug.

🌈 Expected behaviour
What did you expect to happen? Is there a section in the docs about this?

ℹ️ Additional context
pinia issues
vuejs/pinia#648

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds-reproWaiting for code that can reproduce the issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions