Resources for learning web design & front-end development:
ONLINE
Design
Resources for learning web design & front-end development:
ONLINE
Design
// Simple JavaScript Templating | |
// John Resig - http://ejohn.org/ - MIT Licensed | |
(function(){ | |
var cache = {}; | |
this.tmpl = function tmpl(str, data){ | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || |
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。 | |
# 官方文档 http://eslint.org/docs/rules/ | |
extends: 'eslint:recommended' | |
# 规则按照首字母在字母表升序排序 | |
rules: | |
# 单行代码块大括号后需要一个空格 | |
block-spacing: 2 |
`emacs --daemon` to run in the background. | |
`emacsclient.emacs24 <filename/dirname>` to open in terminal | |
NOTE: "M-m and SPC can be used interchangeably". | |
* Undo - `C-/` | |
* Redo - `C-?` | |
* Change case: 1. Camel Case : `M-c` | |
2. Upper Case : `M-u` | |
3. Lower Case : `M-l` |
function interval(duration, fn){ | |
this.baseline = undefined | |
this.run = function(){ | |
if(this.baseline === undefined){ | |
this.baseline = new Date().getTime() | |
} | |
fn() | |
var end = new Date().getTime() | |
this.baseline += duration |
React Native lets you build mobile apps using only JavaScript. It uses the same design as React, letting you compose a rich mobile UI from declarative components.
https://facebook.github.io/react-native/
It depends on what project you are going to build. As for front-end developer, you nearly need to learn nothing, only a new way to write javascript (Redux, JSX).
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
For a code newbie like myself, callbacks, closures and promises are scary JavaScript concepts.
10 months into my full-time dev career, and I would struggle to explain these words to a peer.
So I decided it was time to face my fears, and try to get my head around each concept.
Here are the notes from my initial reading. I'll continue to refine them as my understanding improves.