XIAOXIAOJING

JUST DO IT


  • Home

  • Tags

  • Categories

  • Archives

React记录:新特性

Posted on 2018-01-18 | Post modified: 2018-06-23 | In React系列
React v16.2.0React.Fragment可以使用React.Fragment来包裹多个React Element。渲染后不会创建多余的DOM123456789101112const Fragment = React.Fragmentrender() { return ( ...
Read more »

React学习:React Element

Posted on 2018-01-17 | Post modified: 2018-06-23 | In React系列
React ElementReact Element是一个简单的对象(plain object),描述了组件实例或DOM节点以及它们所需的属性,用于告诉React你想要渲染什么。React Element是一个不可变的描述性对象,element对象上没有任何方法,它有两个主要的属性:type和pro ...
Read more »

React学习:React的生命周期

Posted on 2018-01-13 | Post modified: 2018-06-23 | In React系列
关于创建组件的一段历史【早期】创建一个组件有三种方法:通过 React.createClass、ES6 class、Function。【现在】随着React v16.0的发布,React中React.createClass这个方法的实现被移除,facebook提供一个单独的包:create-reac ...
Read more »

ES6学习:Iterator和Generator

Posted on 2018-01-03 | Post modified: 2018-06-23 | In ES6系列
前言 普通的for循环存在的问题: 在循环里,需要跟踪索引,意思就是:需要声明一个变量来存储索引,并且每次循环后要更新其值。 迭代器(Iterators)可以消除循环(loop)的复杂性和易错性 迭代器(Iterator) Iterators are objects with a specif ...
Read more »

React学习:context的使用和原理

Posted on 2017-12-27 | Post modified: 2018-06-23 | In React系列
我们为什么使用context? context提供了一种直接传递数据到组件树深处组件的方式,数据不需要一层一层传递下去。 用法 改写父组件:添加getChildContext方法和childContextTypes属性 123456789101112class ParentComponent ex ...
Read more »

《深入React技术栈》学习笔记:Flux

Posted on 2017-12-22 | Post modified: 2018-06-23 | In React系列
Flux的核心思想 数据和逻辑永远是单向流动的,即:unidirectional data flow Flux的组成 3大部分: dispatcher(分发事件) store(保存数据,同时响应事件并更新数据) view(订阅store中的数据,并使用这些数据渲染相应页面) 其他部分: c ...
Read more »

使用Later.js定义定时任务

Posted on 2017-12-20 | Post modified: 2018-06-23 | In 其他
官方文档:http://bunkat.github.io/later/ 1.Start:每五秒钟执行一次程序12345const later = require('later')const sched3 = later.parse.recur().every(5).secon ...
Read more »

React原理:Fiber

Posted on 2017-12-16 | Post modified: 2018-06-23 | In React系列
React Fiber The goal of React Fiber is to increase its suitability for areas like animation, layout, and gestures. Its headline feature is incremental ...
Read more »

面向对象的程序设计之继承

Posted on 2017-12-05 | Post modified: 2018-06-23 | In JavaScript
1.原型链1) 例子,继承关系如图所示 123456789101112131415function SuperType () { this.property = true}SuperType.prototype.getSuperValue = function () ...
Read more »

面向对象的程序设计之创建对象

Posted on 2017-12-05 | Post modified: 2018-06-23 | In JavaScript
一、理解原型对象 实例上的属性和原型上的属性的关系 读取对象属性时,会先看实例上是否有这个属性,如果没有再看原型上是否有这个属性 实例只能访问原型对象上的值,而不能通过对象实例重写原型中的值 在对象实例上定义属性,会屏蔽原型对象中保存的同名属性 只有使用delete删除对象实例上的属性,才能访问到 ...
Read more »
12345
TJ

TJ

xiaoxiaojing's blog

47 posts
11 categories
17 tags
© 2017 — 2018 TJ
my love, I will find you!