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

Add no-children-prop to recommended configuration #842

Closed
lencioni opened this issue Sep 16, 2016 · 3 comments
Closed

Add no-children-prop to recommended configuration #842

lencioni opened this issue Sep 16, 2016 · 3 comments
Assignees
Milestone

Comments

@lencioni
Copy link
Collaborator

This rule prevents children from being passed in as a children prop and will be added by #722. It might be nice to add it to the recommended configuration. Thoughts?

@lencioni lencioni added this to the 7.0.0 milestone Sep 16, 2016
@ljharb
Copy link
Member

ljharb commented Sep 16, 2016

I don't think this should be recommended. I feel that nested children are the entire value proposition of jsx, and if one is not using them, one should not be using jsx either.

@lencioni
Copy link
Collaborator Author

I think you misunderstand what the rule does. It prevents using <div children={foo}> in favor of requiring you to use <div>{foo}</div> (similarly for non-JSX).

@ljharb
Copy link
Member

ljharb commented Sep 16, 2016

Whoops, you're right. In that case, I'm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants