Currently: ```@file:JsModule("react-plotly.js") @f...
# javascript
p
Currently:
Copy code
@file:JsModule("react-plotly.js")
@file:JsNonModule

import react.*

@JsName("Plot")
external val reactPlot: RClass<dynamic>
But getting:
Copy code
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `Welcome`.
    in Welcome react.development.js:315
    React 3
    child_5 sampleproject.js:20925
    child_6 sampleproject.js:20931
    invoke_100 sampleproject.js:20934
    render_0 sampleproject.js:25196
    invoke_103 sampleproject.js:21108
    factory_40 sampleproject.js:21164
    buildElements sampleproject.js:21020
    render_1 sampleproject.js:21129
    render sampleproject.js:21132
    React 13
    render_0 sampleproject.js:24780
    render$default sampleproject.js:24785
    invoke_129 sampleproject.js:25057
    factory_45 sampleproject.js:25070
    (Async: EventHandlerNonNull)
    main sampleproject.js:25010
    <anonymous> sampleproject.js:25508
    <anonymous> sampleproject.js:3
    <anonymous> sampleproject.js:15
    <anonymous> sampleproject.js:25490
    js sampleproject.js:707
    __webpack_require__ sampleproject.js:30
    0 sampleproject.js:719
    __webpack_require__ sampleproject.js:30
    <anonymous> sampleproject.js:94
    <anonymous> sampleproject.js:97
    webpackUniversalModuleDefinition sampleproject.js:9
    <anonymous> sampleproject.js:10
t
It_must_be.cpp
p
Well that got me from complaining it's undefined to complaining it's object.
Copy code
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `Welcome`.
    in Welcome react.development.js:315
I'm using it like so
Copy code
reactPlot {
            attrs {
                data = js("...")
            }
        }
t
p
wow it works?
no idea how I would have ever figured that out but yea
t
For
data
creation you can use
jsObject
factory method (+
useMemo
)
p
Could not get that to work either
but it complained about unexpected dynamic type or something
Slack unable to create code snippet
p
oh nice
t
p
Can you use typescript definitions as Kotlin?? Or just as a reference?
t
Just for reference
Usually
any
in TS and
dynamic
in Kotlin means, that declaration missed
plotly use strict contracts as I see
It meants that
dynamic
not required. Strict external interfaces can be used
Or options in future! Feel free to vote 🙂