We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stateless Functional Component:
function Welcome(props) { return <h1>Hello, {props.name}</h1>; }
ES6 Component:
class Welcome extends React.Component { render() { return <h1>Hello, {this.props.name}</h1>; } }
使用
<Welcome name="Zhongyuan" />
延伸阅读
The text was updated successfully, but these errors were encountered:
Advantage
更容易理解(ES5嘛)
代码函数更少
性能更好(假的)
Sorry, something went wrong.
No branches or pull requests
Stateless Functional Component:
ES6 Component:
使用
延伸阅读
The text was updated successfully, but these errors were encountered: