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

Warn if a recovering React user accidentally types 'className' instead of 'class' #5777

Closed
Rich-Harris opened this issue Dec 12, 2020 · 5 comments · Fixed by #5836
Closed

Comments

@Rich-Harris
Copy link
Member

Slightly tongue-in-cheek, but I've actually hit this myself occasionally while porting React components to Svelte:

Screen Shot 2020-12-12 at 1 42 47 PM

@pngwn
Copy link
Member

pngwn commented Dec 12, 2020

Opportunities for zing should never be passed up.

@Conduitry
Copy link
Member

image

@pngwn
Copy link
Member

pngwn commented Dec 12, 2020

That is a property not an attribute.

Edit: This was in response to a now deleted comment.

@finnbear
Copy link

finnbear commented Dec 21, 2020

I think this also applies to for instead of htmlFor and on:input instead of onChange

@Conduitry
Copy link
Member

className and htmlFor will now both result in compiler warnings in 3.31.1.

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 a pull request may close this issue.

4 participants