LHL REACT notes

react

npm add --save-dev eslint

node_modules/.bin/eslint

Just use nodemon instead of node to run your code, and now your process will automatically restart when your code changes.

npm install -g nodemon

Do a global search for non-digit characters:

/\D/

/[0-9]/

REACT

  1. wireframe : Wireframe 是一種低保真度的設計原型,在去除所有視覺設計細節之下,進行頁面結構、功能、內容規劃。初次接觸Wireframe的人會非常不習慣這種呈現方式,頁面上只有方框和文字,沒有圖片和色彩。繪製Wireframe的目的在於確認每一個頁面的構成,重點在於畫面上要呈現什麼內容、而不是看起來漂不漂亮。

  2. Sketch: CSS

  3. html: hard-code the page

  4. JSX:

    5

  5. import React, { Component } from ‘react’;

    class Main extends Component {

    render (){

    return (

         </Main>

    )

    }

    }

    export default Main;

How to Draw Using Gimp

Chatty by Don, websocket
https://github.com/donburks/chatty_may012017

holly shit!!!
http://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&q=dog

Javascript Prototype
https://blog.techbridge.cc/2017/04/22/javascript-prototype/

function Person(name, age) {

this.name = name;

this.age = age;

}

Person.prototype.log = function () {

console.log(this.name + ', age:' + this.age);

}

var nick = new Person('nick', 18);

// 這個剛講過了,nick.__proto__ 會指向 Person.prototype

console.log(nick.__proto__ === Person.prototype) // true

// 那 Person.prototype.__proto__ 會指向誰呢?會指向 Object.prototype

console.log(Person.prototype.__proto__ === Object.prototype) // true

// 那 Object.prototype.__proto__ 又會指向誰呢?會指向 null,這就是原型鍊的頂端了

console.log(Object.prototype.__proto__) // null

console.log(global)

zero, empty string, null, false, undefined : these are 5 values return false in JS

false and nil: ruby return nil ( ruby way: puts ‘poop’ unless nil )

以上是 LHL REACT notes 的全部内容, 来源链接: utcz.com/z/381630.html

回到顶部