一、Algorithm
121. 买卖股票的最佳时机
本人的暴力解法:


二、Review
4 Best Practices To Write Quality JavaScript Modules
总结:
1、Prefer named exports
使用命名的exports代替default exports;
2、No work during import
The module-level scope shouldn’t do heavy computation like parsing JSON, making HTTP requests, reading local storage, etc.
module作用域中不要进行JSON解析、http请求、读取本地存储等复杂计算
3、 Favor high cohesion modules
编写高内聚modules
4、Avoid long relative paths
避免使用过长相对路径
通过webpack或babel-plugin-module-resolver配置根路径的方式处理
三、Tip

四、Share
本周梳理了react中setState的异步机制和批量推迟更新机制
React setState合并和批量处理