reactjs
xiewz1112
这个作者很懒,什么都没留下…
展开
-
React——Thinking in React
class ProductCategoryRow extends React.Component { render() { const category = this.props.category; return ( <tr> <th colSpan="2"> {category} </th> </tr> ); } } class ProductRow原创 2021-03-17 13:09:30 · 129 阅读 · 0 评论 -
React——conditional render
条件渲染一:element variable function UserGreeting(props) { return <h1>Welcome back!</h1>; } function GuestGreeting(props) { return <h1>Please sign up.</h1>; } function LoginButton(props) { return ( <button onClick={props.o原创 2021-03-10 10:42:00 · 160 阅读 · 0 评论 -
React——Component reuse
function Comment(props) { return ( <div className="Comment"> <UserInfo user={props.author} /> <div className="Comment-text"> {props.text} </div> <div className="Comment-date"> {pro原创 2021-03-08 13:09:22 · 153 阅读 · 0 评论