dukat icon indicating copy to clipboard operation
dukat copied to clipboard

React "material-ui" : unresolved reference React

Open up-to-you opened this issue 7 years ago • 5 comments

After generation kotlin stubs for react material-ui (ts2kt v0.0.20, material-ui v0.20), runtime results:

src/material/index.__MaterialUI.kt:339:33: error: unresolved reference: React
external interface PaperProps : React.HTMLAttributes<Any>, React.Props<Paper> {
                                ^

up-to-you avatar Dec 22 '17 12:12 up-to-you

RIght now you should convert react declarations by your self and maybe fix some references. Sorry for the inconvenience.

bashor avatar Dec 26 '17 11:12 bashor

Can you provide example at least for this case ? I mean React declaration and its attributes. Thanks in advance!

up-to-you avatar Dec 26 '17 11:12 up-to-you

Declarations that are you need are here https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/v15/index.d.ts

bashor avatar Dec 26 '17 12:12 bashor

yeah but i don't think those are compatible with JetBrains React Wrapper... Is there any solution to make material-ui work with the official wrappers?

lamba92 avatar Oct 29 '18 18:10 lamba92

I'm seeing the same error with Reactist (among a few others):

Output

To reproduce, add to any Kotlin/JS project and build:

implementation(npm("@doist/reactist", "^11.0.0", generateExternals = true))

goncalossilva avatar Jan 18 '22 17:01 goncalossilva