摘要: 比如我们常用的异步请求: 初学js的时候,被回调函数搞得很晕,现在回过头来总结一下什么是回调函数。 我们先来看看回调的英文定义:A callback is a function that is passed as an argument to another function and is exec 阅读全文
posted @ 2019-02-12 17:33 Lolita_web 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Ubuntu 18 密码:Fenghaiyan35 netstat -plnt //查看所有文件 sudo apt-get install apache2 // 安装apache cd /etc/apache2 ls cd sites-enabled vim 000-default.conf 冒号: 阅读全文
posted @ 2019-02-12 15:40 Lolita_web 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Linode Manager 报错 系统重新安装后 解决办法执行 rm -rf ~/.ssh/known_hosts 再继续执行:ssh root@72.14.189.163 阅读全文
posted @ 2019-02-08 11:43 Lolita_web 阅读(145) 评论(0) 推荐(0) 编辑
摘要: const scaleNames = { c: 'Celsius', f: 'Fahrenheit' }; function toCelsius(fahrenheit) { return (fahrenheit - 32) * 5 / 9; } function toFahrenheit(celsius) { return (celsius * 9 /... 阅读全文
posted @ 2019-02-04 14:27 Lolita_web 阅读(461) 评论(0) 推荐(0) 编辑
摘要: class Reservation extends React.Component { constructor(props) { super(props); this.state = { isGoing: true, numberOfGuests: 2, value: '' ... 阅读全文
posted @ 2019-02-04 13:11 Lolita_web 阅读(244) 评论(0) 推荐(0) 编辑
摘要: function NumberList(props) { const numbers = props.numbers; const listItems = numbers.map((number) => {number} ); return ( {listItems} ); } cons... 阅读全文
posted @ 2019-02-02 12:46 Lolita_web 阅读(1286) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑