# react-comment **Repository Path**: faryangsh/react-comment ## Basic Information - **Project Name**: react-comment - **Description**: 使用react 完成评论页面demo练习 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-11-26 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 使用脚手架创建一个React应用 * react脚手架 * react提供了一个专门用于创建react项目的脚手架库: create-react-app * 项目的整体技术架构为: react + webpack + es6 + eslint * 创建项目并启动 * npm install -g create-react-app * create-react-app hello-react * cd hello-react * npm start * 说明: ## react组件化编码练习1: 实现一个评论管理功能 * 拆分组件: * 应用组件: App * 添加评论组件: CommentAdd * 评论项组件: CommentItem * 评论列表组件: CommentList * 确定组件的state和props: * App: * state: comments/array * CommentAdd * state: username/string, content/string * CommentItem * props: comment/object * commentList * props: comments/array * 编写静态组件 * 实现动态组件 * 动态展示数据 * 响应用户操作, 更新组件界面