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

check for unknown props when creating component #2840

Conversation

colincasey
Copy link
Contributor

#2174: checks for any props which have been passed to the component on create that do not match it's writable props and, when detected, emits a warning such as the following:

<X> was created with unknown attribute 'y'

@Rich-Harris Rich-Harris merged commit 05fb05b into sveltejs:master May 26, 2019
@Rich-Harris
Copy link
Member

Thank you! This is a great addition

@colincasey colincasey deleted the feat/2174_dev_runtime_warning_when_passing_unknown_props branch May 27, 2019 02:49
@EddyVinck
Copy link
Contributor

Hi! This error provides some good information. I do have a question though for my use case.

<Product> was created with unknown prop 'id' is the error I'm getting. I'm spreading an object's keys and values as properties on for convenience. Can I keep spreading the object while getting rid of the error somehow? Thanks!

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.

3 participants