Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

ES6 template is not working #28

Closed
unbug opened this issue Apr 26, 2015 · 2 comments
Closed

ES6 template is not working #28

unbug opened this issue Apr 26, 2015 · 2 comments

Comments

@unbug
Copy link

unbug commented Apr 26, 2015

How to make ES6 template working?

<DefaultLayout title={this.props.title}>
        <script dangerouslySetInnerHTML={{__html:`
          function test(a){
            alert(a);
          }
          test();
        `}} />
</DefaultLayout>

I got error React.createElement("script", {dangerouslySetInnerHTML: {__html: ^ Unexpected token ILLEGAL`

@zpao
Copy link
Member

zpao commented Apr 27, 2015

Are you specifying harmony: true when creating the engine?

@unbug
Copy link
Author

unbug commented Apr 28, 2015

I though it was the default setting,now it works like a charm!

@unbug unbug closed this as completed Apr 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants