摘要: import React from 'react'; import ReactDOM from 'react-dom'; class LoginControl extends React.Component { constructor(props) { super(props); this.handleLoginClick = this.handleLo... 阅读全文
posted @ 2019-01-31 15:31 Lolita_web 阅读(301) 评论(0) 推荐(0) 编辑
摘要: 开关按钮制作 import React from 'react'; import ReactDOM from 'react-dom'; class Toggle extends React.Component { constructor(props) { super(props); this.sta 阅读全文
posted @ 2019-01-31 15:24 Lolita_web 阅读(481) 评论(0) 推荐(0) 编辑
摘要: import React from 'react'; import ReactDOM from 'react-dom'; function formatDate(date) { return date.toLocaleDateString(); } const comment = { date: new Date(), text: 'I hope you enj... 阅读全文
posted @ 2019-01-31 14:46 Lolita_web 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 1.函数试组件 2.函数试组件改成类组件 阅读全文
posted @ 2019-01-31 14:29 Lolita_web 阅读(376) 评论(0) 推荐(0) 编辑