摘要: 现在我们的Redux和React-Redux已经基本实现了,在Redux中,触发一个action,reducer立即就能算出相应的state,如果我要过一会才让reducer计算state呢怎么办?也就是我们如何实现异步的action呢?这里就要用到中间件(middleware) 1. 中间件(mi 阅读全文
posted @ 2019-01-10 23:24 xxx=== 阅读(977) 评论(0) 推荐(0) 编辑
摘要: const mysql = require('mysql'); const pool = mysql.createPool({ port: 3306, user: 'root', password: 'root', database: 'people' }) const query = (sql, 阅读全文
posted @ 2019-01-10 22:27 xxx=== 阅读(152) 评论(0) 推荐(0) 编辑