create-react-kotlin-app

How to import node module in React-Kotlin?

孤街浪徒 提交于 2019-12-06 03:15:53
问题 I created an app using the create-react-kotlin-app command and it loads in Chrome fine. I added the React Material UI package via NPM and that was successful. Now how do I use the Material UI module in my component? Normally with JavaScript, it's a simple import Button from '@material-ui/core/Button' at the top of the component's file, but Kotlin doesn't like that. How do I translate that line to Kotlin? I am not using Gradle. 回答1: I have been struggling with this problem for days now. I came

How to import node module in React-Kotlin?

元气小坏坏 提交于 2019-12-04 08:47:40
I created an app using the create-react-kotlin-app command and it loads in Chrome fine. I added the React Material UI package via NPM and that was successful. Now how do I use the Material UI module in my component? Normally with JavaScript, it's a simple import Button from '@material-ui/core/Button' at the top of the component's file, but Kotlin doesn't like that. How do I translate that line to Kotlin? I am not using Gradle. I have been struggling with this problem for days now. I came up with the following solution. First we will see multiple ways to declare external modules, then I will