-
Notifications
You must be signed in to change notification settings - Fork 14
TypeError when using ui-harness with TypeScript and Radium #86
Comments
Sorry you weren't able to get it working with Typescript. Seems to be related to FormidableLabs/radium#443, which is also related to lodash/lodash#1193 and tvcutsem/harmony-reflect#55. Since Typescript supports decorators... do you reckon you could try a decorator and see if that works? I know you should be able to use the HOF (and we should fix this), but just to get it working, maybe try that first? |
Okay, so it works when using Radium in the ui-harness examples (pushed a branch at https://github.com/philcockfield/ui-harness/tree/radium-typescript). It must be something to do with importing the ui-harness into another project, maybe something to do with babel not transforming. Maybe it has something to do with a |
@Dilatorily - can you give an example of how you're decorating your components. We haven't been using the @decorators yet, as they're not a formal part of the spec yet. I wonder if that's what's causing issues. Can you paste in an example decorated component please? |
@philcockfield I think he means using the higher order function as a "decorator" Aside: I wonder how many mentions @decorators gets... 😂 |
@philcockfield Sorry about the "decorator", @frederickfogerty is right. I meant the higher order function. On the other hand, I tried using the decorator Turns out, I needed to add a |
what do you guys think the long term solution for this is? |
We need to handle the babel config better than we are right now, I've got some ideas in #97, which is essentially the same problem as this |
So I already have a working app and am not using
With my package.json that looks like this:
If I simply add the es2015-classes plugin into the babel config, it causes piles of issues with the currently running and dependable application. |
When I decorate my component with Radium in TypeScript, I get an empty browser with this message in the console.
I made a repository to reproduce this error here: Dilatorily/ui-harness-issue@8d834db84c0dbae4990e42b5022b8cb57ef438e8
When I remove the decorator, ui-harness renders as expected.
https://github.com/Dilatorily/ui-harness-issue/blob/master/src/components/Component.tsx#L40
The text was updated successfully, but these errors were encountered: