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

fix: Fix Vue warning 'Non-function value encountered' #615

Merged
merged 2 commits into from
Nov 13, 2023

Conversation

peterbud
Copy link
Contributor

@peterbud peterbud commented Oct 22, 2023

Description

When using a Wrapper component the browser log was showing a number of warnings when mounting and rendering Wrapper components.

[Vue warn]: Non-function value encountered for default slot. Prefer function slots for better performance. 

See repro here:
https://stackblitz.com/edit/nuxt-starter-wdpsex

Open Dev Tools to see the warnings in the browser console

Additional context

This PR aims to fix that by using () => function slots eliminating the warning


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • If it's a new feature, provide a convincing reason to add it. Ideally, you should open a suggestion issue first and have it approved before working on it.
  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@codesandbox
Copy link

codesandbox bot commented Oct 22, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@stackblitz
Copy link

stackblitz bot commented Oct 22, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Oct 22, 2023

Deploy Preview for histoire-examples-svelte3 ready!

Name Link
🔨 Latest commit a94b8e0
🔍 Latest deploy log https://app.netlify.com/sites/histoire-examples-svelte3/deploys/6552003917c8020008e1a710
😎 Deploy Preview https://deploy-preview-615--histoire-examples-svelte3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 22, 2023

Deploy Preview for histoire-site ready!

Name Link
🔨 Latest commit a94b8e0
🔍 Latest deploy log https://app.netlify.com/sites/histoire-site/deploys/6552003926f4ca000836c4a8
😎 Deploy Preview https://deploy-preview-615--histoire-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 22, 2023

Deploy Preview for histoire-examples-vue3 ready!

Name Link
🔨 Latest commit a94b8e0
🔍 Latest deploy log https://app.netlify.com/sites/histoire-examples-vue3/deploys/65520039f119c20008bb53c5
😎 Deploy Preview https://deploy-preview-615--histoire-examples-vue3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Oct 22, 2023

Deploy Preview for histoire-controls ready!

Name Link
🔨 Latest commit a94b8e0
🔍 Latest deploy log https://app.netlify.com/sites/histoire-controls/deploys/65520039dcbe240008b2a1cd
😎 Deploy Preview https://deploy-preview-615--histoire-controls.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@peterbud
Copy link
Contributor Author

peterbud commented Nov 2, 2023

@Akryum : I'm not sure - is there anything I can add to this PR? LMK!

Akryum and others added 2 commits November 13, 2023 11:52
…ault slot.'

When using a Wrapper component the browser log was showing a number of warnings when mounting and rendering Wrapper components. This PR aims to fix that by using () => function slots
@Akryum Akryum changed the title fix(Wrapper): Fix Vue warning 'Non-function value encountered' fix: Fix Vue warning 'Non-function value encountered' Nov 13, 2023
@Akryum Akryum merged commit 3ab40ae into histoire-dev:main Nov 13, 2023
12 checks passed
@peterbud peterbud deleted the feat/wrapper branch November 14, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants