Skip to content

Warning emitted when running test suite #719

Open

Description

@apbendi

Is this an actual issue? If not, can it be suppressed. If so, let's fix it.

    console.warn
      [Vue warn]: onMounted is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.

      37 | // Composition function for managing state
      38 | export default function useSettingsStore() {
    > 39 |   onMounted(() => {
         |            ^
      40 |     // Load settings
      41 |     setDarkMode(Boolean(LocalStorage.getItem(settings.isDark)));
      42 |     advancedMode.value = Boolean(LocalStorage.getItem(settings.advancedMode));

      at warn (../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:40:17)
      at injectHook (../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:2717:9)
      at ../node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:2728:5
      at useSettingsStore (src/store/settings.ts:39:12)
      at Object.<anonymous> (src/utils/umbra-api.ts:21:90)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions