自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 React中文文档 9. 表单

1.受控组件class NameForm extends React.Component { constructor(props) { super(props); // 初始化 this.state = {value: ''}; // 如果不初始化state或不进行方法绑定,则不需要为React组件实现构造函数 } handleChange = (event) => { this.setState({value: event.target..

2022-05-10 00:56:09 319

原创 React中文文档 8. 列表 & Key

1.遍历const numbers = [1, 2, 3, 4, 5];const listItems = numbers.map((number) => <li>{number}</li>);ReactDOM.createRoot(document.getElementById('root')).render(<ul>{listItems}</ul>);2.基础列表组件function NumberList(props)

2022-05-10 00:13:56 439

原创 React中文文档 7. 条件渲染

1.条件渲染function UserGreeting(props) { return <h1>Welcome back!</h1>;}function GuestGreeting(props) { return <h1>Please sign up.</h1>;}function Greeting(props) { const isLoggedIn = props.isLoggedIn; if (isLoggedIn) { .

2022-05-09 22:43:51 131

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除