gabrielbull / react-desktop

React UI Components for macOS High Sierra and Windows 10
http://reactdesktop.js.org
MIT License
9.52k stars 462 forks source link

NavMenu does not work with TypeScript #63

Closed gabrielbull closed 8 years ago

gabrielbull commented 8 years ago

I separated the two issues. Reference: Issue #61

Also, I started writing typings for react-desktop thinking it was the reason I couldn't get my NavMenu working, but it still didn't (called setstate() on an unmounted component) work (and my definitions are neither done nor guaranteed perfect).

Did you get it to work? Your example converted to ES6 works fine

erichiller commented 8 years ago

No, unfortunately, I am still having the same issue. I am not sure on this one, is your gist from my typescript directly transpiled?

gabrielbull commented 8 years ago

I transpiled by hand to ES6.

erichiller commented 8 years ago

Here I've done one I transpiled into commonjs - one into es6 -- they look proper and nearly the same, but rather than maintaining the jsx syntax, it is replaced with the underlying javascript it would appear. (ala React.createElement( windows_1.NavPane, for <NavPane>. I can not see anything off here?

erichiller commented 8 years ago

I figured this out on my side - it was user error - I was using it improperly, however it did cause me to write a lot more definitions for typescript - I will get these to you soon. Thanks - Eric

gabrielbull commented 8 years ago

Cool thanks!