Answer the question
In order to leave comments, you need to log in
Why can't I export the component?
Hello, there is such a problem.
there is an app.jsx file
import React, { Component } from 'react'
import enterForm from './formi.jsx'
import ReactDOM from 'react-dom'
ReactDOM.render(
<enterForm />,
document.getElementById('formi')
)
import React, { Component, PropTypes } from 'react'
export default class enterForm extends Component {
render() {
return (
<div>
<label>Логин</label>
<input type='text' ref='login' />
<label>Пароль</label>
<input type='text' ref='pass' />
<button onClick={e => this.handleClick(e)}>
Add
</button>
</div>
)
}
handleClick(e) {
alert('tyty');
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question