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

Support for Syntax Do Expression #2523

Closed
tonyxiao opened this issue Sep 25, 2016 · 2 comments
Closed

Support for Syntax Do Expression #2523

tonyxiao opened this issue Sep 25, 2016 · 2 comments

Comments

@tonyxiao
Copy link

Given the following snippet

http://babeljs.io/docs/plugins/transform-do-expressions/

const Component = props =>
  <div className='myComponent'>
    {do {
      if(color === 'blue') { <BlueComponent/>; }
      if(color === 'red') { <RedComponent/>; }
      if(color === 'green') { <GreenComponent/>; }
    }}
  </div>

Flow complains that

Unexpected token do at line... col ...

Is there a way for to help flow figure out how to support do expressions?

@gabro
Copy link
Contributor

gabro commented Oct 3, 2016

@tonyxiao this is being tracked in #560, so I guess this issue can be closed?

@tonyxiao
Copy link
Author

tonyxiao commented Oct 3, 2016

Sounds great, closing I will follow that issue thank you.

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

No branches or pull requests

3 participants