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

Unused prop warning #5158

Closed
sharifzadesina opened this issue Jul 16, 2020 · 1 comment
Closed

Unused prop warning #5158

sharifzadesina opened this issue Jul 16, 2020 · 1 comment

Comments

@sharifzadesina
Copy link

sharifzadesina commented Jul 16, 2020

How I am supposed to get rid of this warning?
The warning is because of removing the usage of the segment prop from the _layout component of the sapper.

https://github.com/sveltejs/sapper-template-webpack/blob/master/src/routes/_layout.svelte#L4

This is my whole code:

<script>
export let segment;
</script>

<main>
    <slot></slot>
</main>

I also tried to use <!-- svelte-ignore unused-export-let --> before the script tag but still no chance.

If I stop using segment prop I will get a warning in the browser saying:
<Layout> was created with unknown prop 'segment'

@antony
Copy link
Member

antony commented Jul 17, 2020

You can't, currently. There is an open issue for this #4652

As well as an issue on Sapper (where this issue belongs) to remove this prop sveltejs/sapper#824

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

No branches or pull requests

3 participants