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

NcDialog, NcReferenceWidget generate Vue warnings for the vueuse/core methods #5393

Open
Antreesy opened this issue Mar 11, 2024 · 4 comments
Labels
2. developing Work in progress bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@Antreesy
Copy link
Contributor

Antreesy commented Mar 11, 2024

Warning:
image

UPD: Looking as this also happened with NcReferenceWidget, I'd blame useResizeObserver => useMounted hook:
https://github.com/vueuse/vueuse/blob/9f10ad06a4fd2b4e6325dc72a3d1e36a62b6c254/packages/core/useResizeObserver/index.ts
https://github.com/vueuse/vueuse/blob/9f10ad06a4fd2b4e6325dc72a3d1e36a62b6c254/packages/core/useSupported/index.ts
https://github.com/vueuse/vueuse/blob/9f10ad06a4fd2b4e6325dc72a3d1e36a62b6c254/packages/core/useMounted/index.ts#L12-L17

But tracked it back to our library: #5298

@Antreesy Antreesy added bug Something isn't working 0. to triage labels Mar 11, 2024
@Antreesy Antreesy added this to the 8.10.0 milestone Mar 11, 2024
@Antreesy Antreesy changed the title NcDialog generates Vue warnings for the vueuse/core methods NcDialog, NcReferenceWidget generate Vue warnings for the vueuse/core methods Mar 11, 2024
@susnux
Copy link
Contributor

susnux commented Mar 11, 2024

Yes the useResizeObserver must be moved to the setup.

@Antreesy
Copy link
Contributor Author

Doesn't explain the warnings on NcDialog rendering

@ShGKme
Copy link
Contributor

ShGKme commented Mar 11, 2024

Yes the useResizeObserver must be moved to the setup.

At least in Vue 3, lifecycle hooks like mounted as well as computed also have setup context, so in general case composables works in mounted.

Though, I'd prefer to always use them only in the setup.

@ShGKme ShGKme removed this from the 8.10.0 milestone Mar 11, 2024
@susnux
Copy link
Contributor

susnux commented Mar 13, 2024

Doesn't explain the warnings on NcDialog rendering

vueuse/vueuse#3830

@susnux susnux added 2. developing Work in progress dependencies Pull requests that update a dependency file and removed 0. to triage labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

3 participants