vuejs / pinia

🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support
https://pinia.vuejs.org
MIT License
13.02k stars 1.04k forks source link

pinia doesn't show state properly when useAsyncState has been used #2667

Closed aslan0402 closed 4 months ago

aslan0402 commented 4 months ago

Reproduction

playground doesn't connect vuecore properly....

Steps to reproduce the bug

Install vue3, pinia, @vueuse/core

import { useAsyncState } from '@vueuse/core';
import { defineStore } from 'pinia';

const useSomeStore = defineStore('someStore', () => {
    const claimDeatailsStore = useClaimDetailsStore();

    const someData = useAsyncState(
        args => {
            return getSomeData(args);
        },
        [],
        {
            immediate: false,
            shallow: false
        }
    );

    return { someData };
});

Check VueDevTool pinia section. There will be empty space.

Expected behavior

Pinia has to show data properly

Actual behavior

Pinia doesn't show state inside vuedevtool if useAsyncState has been used from '@vueuse/core' lib.

Additional information

No response