fix: do not invoke slots in computed functions by danielroe ยท Pull Request #6133 ยท nuxt/ui
๐ Linked issue
โ Type of change
- ๐ Documentation (updates to the documentation or readme)
- ๐ Bug fix (a non-breaking change that fixes an issue)
- ๐ Enhancement (improving an existing functionality)
- โจ New feature (a non-breaking change that adds functionality)
- ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
If you run nuxt/nuxt.com locally you'll see these warnings spamming in the console:
[14:30:13] WARN [Vue warn]: Slot "default" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.at <ProseCodeTree>
at <AsyncComponentWrapper>
at <MDCRenderer>
at <MDC>
at <AsyncComponentWrapper>
this aims to fix it by not invoking slots in a computed function but doing so in render lifecycle hooks
๐ Checklist
- I have linked an issue or discussion.
- I have updated the documentation accordingly.