# react_learn **Repository Path**: z1426567242_admin/react_learn ## Basic Information - **Project Name**: react_learn - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-06 - **Last Updated**: 2023-11-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ##### 字段结构 ``` state = { todos: [ { id : 1, name: '学习react', is_deal: false }, { id : 2, name: '睡觉', is_deal: true }, { id : 3, name: '吃饭', is_deal: true }, ] } ``` ### 组件传参 >>> list->item >>> {...item} 表示item里面得字段展开传递 ``` render(){ const {todos} = this.props console.log(todos) return ( ) } ``` >> item 组件接收值 ``` render(){ const {id,name} = this.props return (
  • { name }
  • ) } } ```