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

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

Closed
thisVioletHydra opened this issue Sep 17, 2021 · 5 comments
Assignees
Labels
bug Something isn't working needs-repro Waiting for code that can reproduce the issue

Comments

@thisVioletHydra
Copy link

thisVioletHydra commented Sep 17, 2021

πŸ› 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

@thisVioletHydra thisVioletHydra added the bug Something isn't working label Sep 17, 2021
@danielroe
Copy link
Member

@thisVioletHydra Would you provide a reproduction via https://template.nuxtjs.org ? πŸ™

@danielroe danielroe added the needs-repro Waiting for code that can reproduce the issue label Sep 17, 2021
@thisVioletHydra
Copy link
Author

@thisVioletHydra Would you provide a reproduction via https://template.nuxtjs.org ? πŸ™

okay no problem

@thisVioletHydra
Copy link
Author

@thisVioletHydra Would you provide a reproduction via https://template.nuxtjs.org ? πŸ™

https://codesandbox.io/s/weathered-bird-l4kww?file=/components/Test.vue
push refresh page
image
image

@thisVioletHydra
Copy link
Author

@danielroe any news ?

@posva
Copy link

posva commented Oct 1, 2021

The error comes from vuejs/composition-api#821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-repro Waiting for code that can reproduce the issue
Projects
None yet
Development

No branches or pull requests

3 participants