framework
framework copied to clipboard
docs(guide): add warning about .client onMounted hook
🔗 Linked issue
resolve https://github.com/nuxt/framework/issues/9185
❓ Type of change
- [x] 📖 Documentation (updates to the documentation or readme)
- [ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
- [ ] 👌 Enhancement (improving an existing functionality like performance)
- [ ] ✨ New feature (a non-breaking change that adds functionality)
- [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
📚 Description
hi :wave: This PR warns about the onMounted hooks on .client components.
Since the createClientOnly only render the component after being mounted, we don't have any access to the rendered template defined on the .vue file before the nextTick
📝 Checklist
- [x] I have linked an issue or discussion.
- [ ] I have updated the documentation accordingly.
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders