Manifest File
    
            
摘要:【Manifest File】 on every build, webpack generates some webpack runtime code, which helps webpack do its job. When there is a single bundle, the runtim
        
阅读全文
摘要:【CommonsChunkPlugin】 The CommonsChunkPlugin is an opt-in feature that creates a separate file (known as a chunk), consisting of common modules shared 
        
阅读全文
摘要:【webpack-manifest-plugin】 Webpack plugin for generating an asset manifest. This will generate a manifest.json file in your root output directory with 
        
阅读全文
摘要:【webpack config】 1、entry Simple rule: one entry point per HTML page. SPA: one entry point, MPA: multiple entry points. 2、output.filename Specifies the
        
阅读全文
摘要:【Webpack Getting Started】 Make sure you have a fresh version of Node.js installed. If you are using npm scripts in your project, npm will try to look 
        
阅读全文
摘要:【极简经济学】 1、研究经济学的理由就是“为了避免被经济学家欺骗”。 2、对公共政策做出建议的经济学,大多只用到大学入门课程的程度。 3、很多经济取舍都有一个特色:它能帮助某些人,却同时伤害了其他人。经济学家关心的是统计受到伤害或帮助的所有人,而不只是新闻报道里的几张脸孔。 4、每个人通常既不打算促
        
阅读全文
摘要:【getOwnPropertySymbols】 The Object.assign() method only copies enumerable and own properties from a source object to a target object. Note that Object
        
阅读全文
摘要:【Symbol】 The Symbol() function returns a value of type symbol. it does not support the syntax "new Symbol()". Every symbol value returned from Symbol(
        
阅读全文
摘要:【Object.defineProperty】 1、The Object.defineProperty() method defines a new property directly on an object, or modifies an existing property on an obje
        
阅读全文
摘要:【动态作用域】 作用域有两种: 1、动态作用域 2、词法作用域 JavaScript 中的作用域就是词法 作用域(事实上大部分语言都是基于词法作用域的)。但实际上动态作用域是 JavaScript 另一个重要机制 this 的表亲 词法作用域让 foo() 中的 a 通过 RHS 引用到了全局作用域
        
阅读全文
摘要:【eval】 1、只处理字符串 If the argument of eval() is not a string, eval() returns the argument unchanged. In the following example, the String constructor is 
        
阅读全文
摘要:【common mistake of closure in loops】 下例中item引用的始终是最后一个值。 function showHelp(help) { document.getElementById('help').innerHTML = help; } function setupH
        
阅读全文
摘要:【Emulating private methods with closures】 JavaScript does not provide a native way of doing this, but it is possible to emulate private methods using 
        
阅读全文
摘要:【Typechecking With PropTypes】 1、props类型检查 React has some built-in typechecking abilities. To run typechecking on the props for a component, you can as
        
阅读全文
摘要:【JXS In Depth】 1、Spread Attributes If you already have props as an object, and you want to pass it in JSX, you can use ... as a "spread" operator to p
        
阅读全文
摘要:【Choosing the Type at Runtime】 You cannot use a general expression as the React element type. If you do want to use a general expression to indicate t
        
阅读全文
摘要:【User-Defined Components Must Be Capitalized】 When an element type starts with a lowercase letter, it refers to a built-in component like<div> or <spa
        
阅读全文
摘要:【Computed property names】 That allows you to put an expression in brackets [], that will be computed as the property name. 参考:https://developer.mozill
        
阅读全文
摘要:【Controlled Components】 In HTML, form elements such as <input>, <textarea>, and <select> typically maintain their own state and update it based on use
        
阅读全文
摘要:【Handling Event】 1、React events are named using camelCase 2、You must call preventDefault explicitly to prevent default behaviour 3、define callback in 
        
阅读全文
摘要:【State】 1、componentDidMount The componentDidMount() hook runs after the component output has been rendered to the DOM. This is a good place to set up 
        
阅读全文
摘要:【props】 elements can also represent user-defined components: When React sees an element representing a user-defined component, it passes JSX attribute
        
阅读全文
摘要:【Functional and Class Components】 The simplest way to define a component is to write a JavaScript function: This function is a valid React component b
        
阅读全文
摘要:【招聘漂亮的员工】 无意中看到一个史晓燕的访谈,其中有一段她提到优先招聘漂亮的员工而不是丑陋的员工。原文如下。 史晓燕说她招聘女员工的时候很愿意用那些漂亮的女人,因为漂亮能给人带来愉悦。俗话说赏心悦目,第一印象“悦目”了,才会更容易有心情去欣赏对方的心灵,不是吗?对于这个问题,史晓燕说:“我曾经干过
        
阅读全文
摘要:【Spread Syntax】 The spread syntax allows an expression to be expanded in places where multiple arguments are expected. 1、为了将[]传递给一个函数,过去使用apply方法 ES20
        
阅读全文
摘要:【签名Cookie】 set-cookie时加上防篡改验证码。 如: user_name=alex|bj95ef23cc6daecc475de 防篡改验证码的生成规则可以很简单:md5(cookieValue+key)或sha1(cookieValue+key),key可以是服务器端掌握的一个固定字
        
阅读全文
摘要:【fs.watchFile】 fs.watchFile(filename[, options], listener) Watch for changes on filename. The callback listener will be called each time the file is a
        
阅读全文
摘要:【nimble】 series方法用于串行执行多个异步任务,通过npm可安装nimble。 Series works similarly to parallel, only it runs each function only once the previous has finished. Agai
        
阅读全文
摘要:【padding与margin的区别 】 margin就是设置view的上下左右边框的额外空间 padding是设置内容相对view的边框的距离 参考:http://blog.csdn.net/a19860903/article/details/7294956
        
阅读全文
摘要:【android TextView SetText卡顿原因】 不要用wrap_content即可。 参考:http://blog.csdn.net/self_study/article/details/42297573
        
阅读全文
摘要:【SimpleAdapter & BaseAdapter】 参考:http://blog.csdn.net/shakespeare001/article/details/7926783
        
阅读全文
摘要:【android:layout_gravity和android:gravity的区别】 android:gravity: 这个是针对控件里的元素来说的,用来控制元素在该控件里的显示位置。例如,在一个Button按钮控件中设置如下两个属性, android:gravity="left"和android
        
阅读全文
摘要:【Restrict & Cascade】 参考:https://my.oschina.net/cart/blog/277624
        
阅读全文
摘要:【正确理解Mysql的列索引和多列索引】 MySQL数据库提供两种类型的索引,如果没正确设置,索引的利用效率会大打折扣却完全不知问题出在这。 参考:http://blog.csdn.net/lovelyhermione/article/details/4580866
        
阅读全文
摘要:【Shared Preferences】 1、SharedPreferences class. Interface for accessing and modifying preference data returned by getSharedPreferences(String, int) 参考
        
阅读全文