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.