Hi! Has anyone here tried to use react-router-dom ...
# javascript
d
Hi! Has anyone here tried to use react-router-dom inside the Kotlin fullstack example? I added the npm dependency and was able to include it via
runtime.wrappers.require("react-router-dom")
but I think I'm missing the types so that Kotlin can properly instantiate the components (currently I'm using
js("""new Router()""")
. I've tried to use ts2kt on index.d.ts from the definitely typed repo (https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-router-dom), but it notifies me that ImportDeclaration are unsupported. Any ideas how to get this working?
b
dawitt: did ts2kt generate any files? If so you can try to use them. Maybe you will have to edit them.
d
It did, but very incomplete ones. I'll try, thanks!
d
I use it. Give a look at the kodando libraries (https://github.com/danfma/kodando).
👍 1
I still need to put some documentation there but let me show you an example.
👍 1
d
Thanks, I'll check it out!!