treycordova / nativejsx

JSX to native DOM API transpilation. :yellow_heart: <div> ⟹ document.createElement('div')!
MIT License
154 stars 14 forks source link

Add context option support: closure call with this #13

Closed bcaudesaygues closed 7 years ago

treycordova commented 7 years ago

The capability to grab any node is already available:

const element = (
  <div className="root-node">
    <div className="child"/>
  </div>
);

const child = element.querySelector('.child');
// Or in your case:
this.child = element.querySelector('.child');

I may be misunderstanding your use case, of course.

treycordova commented 7 years ago

I'm going to close the pull request. Feel free to reopen it if you have the time to explain your use case!