export default class App extends Component {
render() {
return (
<ButtonBorder onCustomClick={this.handleClick} value='Классика' />
)
}
handleClick(){
console.log('action')
}
}
export default class ButtonBorder extends Component {
const {onCustomClick, value } = this.props;
render() {
return (
<button onClick={onCustomClick} >{value}</button>
)
}
}
const {data} = this.props
data.phones.value[position] = newValue
this.props.onSubmit(data)
npm install react-bootstrap
import Button from 'react-bootstrap/lib/Button';