How do I create a react component using kotlin? e...
# javascript
p
How do I create a react component using kotlin? example.js
Copy code
const Input = () => {
  return <input placeholder="Your input here" />;
};
1. My attempt which does not render anything when method is called:
Copy code
fun input(): ReactElement<Props>? {
    return createElement {
        ReactHTML.input {
            this.attrs.placeholder = "Your input here"
        }
    }
}
2. Also tried this github example but no success: https://github.com/Kotlin/react-redux-js-ir-todo-list-sample/blob/master/src/main/kotlin/reactredux/components/Link.kt#L12
t
b
FYI there's also a specialised #react channel for such questions in the future;)
2