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

Shorthand for prop={false} #13967

Closed
xehpuk opened this issue Oct 25, 2018 · 2 comments
Closed

Shorthand for prop={false} #13967

xehpuk opened this issue Oct 25, 2018 · 2 comments

Comments

@xehpuk
Copy link

xehpuk commented Oct 25, 2018

Feature Request

<Foo bar/>

is the same as

<Foo bar={true}/>

It would be nice to have something like

<Foo !bar/>

meaning

<Foo bar={false}/>
@salvoravida
Copy link

salvoravida commented Oct 26, 2018

< Foo /> => this.props.bar===undefined==false.

why need !bar ?

@aweary
Copy link
Contributor

aweary commented Oct 26, 2018

It's unlikely that we'd do this. In either case this would be a change to JSX, which would require a change to the specification. Please see https://github.com/facebook/jsx

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