index.js:
import React from 'react';
import ReactDOM from 'react-dom';
import Examle from './component/Example.jsx';
ReactDOM.render(<Example><Example>,document.getElementById('root'));
Example.jsx:
import React from 'react';
export default class Example extends React.Component{
constructor(){
super()
this.state={}
}
render(){
return <div>
<button onClick={()=>this.clickhandle("参数")}>按钮</button>
</div>
}
clickhandle=(arg)=>console.log(arg+"123213")
}