<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[cithegod的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/cithegod</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; cithegod]]></copyright><item><title><![CDATA[实现一个Promise-polyfill]]></title><link>https://blog.csdn.net/cithegod/article/details/77131726</link><guid>https://blog.csdn.net/cithegod/article/details/77131726</guid><author>cithegod</author><pubDate>Sat, 12 Aug 2017 22:45:13 +0800</pubDate><description><![CDATA[PromisePromise是ES6标准提供的一个异步操作的很好的语法糖，对于原本的回调函数模式进行了封装，实现了对于异步操作的链式调用。并且配上generator以及async语法糖来使用更加方便。虽然Promise当前在很多浏览器上都已经得到了支持，但是在看Promise的时候，发现对于Promise的很多地方仍然不是很了解。包括其内部的实现机制，写这个代码的目的也是在于对Promise的使用更]]></description><category></category></item><item><title><![CDATA[script标签的defer和async属性]]></title><link>https://blog.csdn.net/cithegod/article/details/76560147</link><guid>https://blog.csdn.net/cithegod/article/details/76560147</guid><author>cithegod</author><pubDate>Tue, 01 Aug 2017 22:12:01 +0800</pubDate><description><![CDATA[defer & async前提在说defer和async两个script标签的属性之前，要先说一下浏览器对于页面进行加载的流程，浏览器渲染页面是基于两棵树进行的，分别是DOM树和render树，DOM树由HTML决定，HTML元素会被解析为一个个节点，自上而下形成一棵树；而render树是由CSS和DOM树决定的，每个节点在接收了CSS之后，会根据其所占据的空间，形成一棵render树，render]]></description><category></category></item><item><title><![CDATA[HTTP 代理]]></title><link>https://blog.csdn.net/cithegod/article/details/76222795</link><guid>https://blog.csdn.net/cithegod/article/details/76222795</guid><author>cithegod</author><pubDate>Thu, 27 Jul 2017 22:48:49 +0800</pubDate><description><![CDATA[HTTP代理]]></description><category></category></item><item><title><![CDATA[CSS3 伪元素和伪类]]></title><link>https://blog.csdn.net/cithegod/article/details/76207069</link><guid>https://blog.csdn.net/cithegod/article/details/76207069</guid><author>cithegod</author><pubDate>Thu, 27 Jul 2017 16:27:18 +0800</pubDate><description><![CDATA[CSS3 伪元素 伪类 应用 聊天气泡]]></description><category></category></item><item><title><![CDATA[TypeScript + React环境构建和demo]]></title><link>https://blog.csdn.net/cithegod/article/details/76173267</link><guid>https://blog.csdn.net/cithegod/article/details/76173267</guid><author>cithegod</author><pubDate>Thu, 27 Jul 2017 10:17:15 +0800</pubDate><description><![CDATA[下面的示例项目可以从我的github上获取为什么用TypeScriptTypeScript为JavaScript这个弱类型语言添加了基本的类型检测以及对于ES6甚至ES7的一些高级语法的转移，在一定程度上相当于增强功能版的babel，现在的很多开源项目为了得到更好的项目管理和维护性能，使用了TypeScript或者Flow来为JavaScript添加强类型。 
TypeScript添加了很多强类型语]]></description><category></category></item><item><title><![CDATA[学习基于Koa2、Mongodb、jade的博客开发]]></title><link>https://blog.csdn.net/cithegod/article/details/61919513</link><guid>https://blog.csdn.net/cithegod/article/details/61919513</guid><author>cithegod</author><pubDate>Mon, 13 Mar 2017 15:55:20 +0800</pubDate><description><![CDATA[基于Koa2、mongodb/mongoose、jade的博客后台]]></description><category></category></item><item><title><![CDATA[React兄弟、父子元素之前的通信]]></title><link>https://blog.csdn.net/cithegod/article/details/53383370</link><guid>https://blog.csdn.net/cithegod/article/details/53383370</guid><author>cithegod</author><pubDate>Mon, 28 Nov 2016 20:00:11 +0800</pubDate><description><![CDATA[React元素之间的通信主要由下面几种方式 
1、 Redux 
2、 EventEmitter 
3、 通过props进行通信（需要有嵌套关系）这里面先记下来比较简单的第三种，因为最近刚刚用到。子元素到父元素父子元素之间的通信主要靠props，这个方法既简单，又好用，所以可以使用这种方法的时候就直接用好了。 
首先有这样的一个React DOM结构：<div className="passage"]]></description><category></category></item><item><title><![CDATA[使用less的loop（循环）方法根据类名生成元素]]></title><link>https://blog.csdn.net/cithegod/article/details/53340366</link><guid>https://blog.csdn.net/cithegod/article/details/53340366</guid><author>cithegod</author><pubDate>Fri, 25 Nov 2016 21:06:30 +0800</pubDate><description><![CDATA[less是一个功能强大的css超集，可以方便我们进行css代码的书写，less具有很多现代语言的特性，而不是简单的标记语言，包括分支和循环，这里我们使用循环来进行元素的自动化生成。下面的代码需要一些less知识：less中文网有时我们需要生成这样一个元素：            <div class="item introduction">
                <div class="s]]></description><category></category></item><item><title><![CDATA[HTML、CSS产品主页注意事项]]></title><link>https://blog.csdn.net/cithegod/article/details/53340272</link><guid>https://blog.csdn.net/cithegod/article/details/53340272</guid><author>cithegod</author><pubDate>Fri, 25 Nov 2016 20:52:22 +0800</pubDate><description><![CDATA[构建项目第一件事–设计页面架构在使用HTML&CSS在构建现在很流行的扁平化风格的页面的时候（或者其它所有的静态页面的时候），第一件事就是需要进行页面结构的设计，不要一上来就手撸代码，有时候重新架构一个项目的难度远远大于从头开始写这个项目。 
需要语义化的使用各种HTML标签，不要将所有的标签都用<div>来设置，这样会使后面的维护变得越来越困难。 
下面是简书的一个页面的部分HTML标签：可以看到]]></description><category></category></item><item><title><![CDATA[CSS transform的rotate，内部元素旋转到背后仍会显示。]]></title><link>https://blog.csdn.net/cithegod/article/details/53101781</link><guid>https://blog.csdn.net/cithegod/article/details/53101781</guid><author>cithegod</author><pubDate>Wed, 09 Nov 2016 16:50:05 +0800</pubDate><description><![CDATA[在写代码的时候出现了一个问题，当使用了CSS3的transform的时候，对下面这个元素进行旋转：//DOM元素的结构
<figure class="img-figure">
    <img src="/assets/97aa04cee801bdd3b8762057267d0767.jpg" alt="This is a beauty">
    <figcaption>
        <h2]]></description><category></category></item><item><title><![CDATA[React--引用（refs and the DOM）]]></title><link>https://blog.csdn.net/cithegod/article/details/53022331</link><guid>https://blog.csdn.net/cithegod/article/details/53022331</guid><author>cithegod</author><pubDate>Thu, 03 Nov 2016 15:54:45 +0800</pubDate><description><![CDATA[Refs and the DOM在标准的React数据流中，props是在父组件和其子组件中唯一的交流手段。为了修改一个子，你需要通过新的props重新渲染。然而，在很小一部分情况下，需要强制修改标准数据流外部的一些数据。子组件需要被修改成一个立即React元素，或者一个DOM元素，React为这两种情况提供了一个问题解决方案。The ref Callback AttributeReact支持一个可]]></description><category></category></item><item><title><![CDATA[React：JSX进阶]]></title><link>https://blog.csdn.net/cithegod/article/details/53019576</link><guid>https://blog.csdn.net/cithegod/article/details/53019576</guid><author>cithegod</author><pubDate>Thu, 03 Nov 2016 11:05:51 +0800</pubDate><description><![CDATA[JSX In Depth最根本上，JSX仅仅提供React.createElement(component,props, ...children)函数这样的语法糖，JSX代码：//JSX代码
<MyButton color="blue" shadowSize={2}>
    Click Me
</MyButton>
//编译之后的JavaScript代码
React.createElement(]]></description><category></category></item><item><title><![CDATA[React官方文档--Composition vs Inheritance]]></title><link>https://blog.csdn.net/cithegod/article/details/52996042</link><guid>https://blog.csdn.net/cithegod/article/details/52996042</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 15:02:52 +0800</pubDate><description><![CDATA[Composition vs InheritanceReact有一个强大的结构模型，我们建议使用结构来代替继承来实现组件之间的重用。 
我们将要考虑一些问题，这些问题是可以用结构来代替继承解决问题。包含一些组件并不知道他们的子元素到底是什么情况，像Sidebar或者Dialog一样都继承自boxes是很正常的一件事情。 
我们建议一些组件使用特殊的children属性来传递子元素直接到他的输出。fu]]></description><category></category></item><item><title><![CDATA[React官方文档--Lifting State Up]]></title><link>https://blog.csdn.net/cithegod/article/details/52996022</link><guid>https://blog.csdn.net/cithegod/article/details/52996022</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 15:01:27 +0800</pubDate><description><![CDATA[Lifting State Up如果，几个组件需要同时影响并且修改同一个数据，我们建议将这个共享状态进行提升，给他们最近的共同祖先。 
在这个部分，我们将要创建一个温度计算器来判断水会不会在给定温度下沸腾。 
我们将从一个叫做BoilingVerdict的组件开始，这个组件接收celsius温度作为属性，然后打印是否足够让水沸腾。 
然后我们创建一个组件叫做Calculator，这个组件渲染一个<i]]></description><category></category></item><item><title><![CDATA[React官方文档--Forms]]></title><link>https://blog.csdn.net/cithegod/article/details/52996002</link><guid>https://blog.csdn.net/cithegod/article/details/52996002</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 15:00:08 +0800</pubDate><description><![CDATA[Forms表单组件，比如：<input>，<textarea>和<option>和基本的组件不同，因为表单组件是需要用户进行交互的。这些组件提供了接口，用来更容易的管理表单来响应用户的交互。 
有两种形式的表单组件 
1. Controlled Components 
2. Uncontrolled ComponentsControlled Components一个受控表单组件提供一个value属性]]></description><category></category></item><item><title><![CDATA[React官方文档--Lists and Keys]]></title><link>https://blog.csdn.net/cithegod/article/details/52995989</link><guid>https://blog.csdn.net/cithegod/article/details/52995989</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 14:59:31 +0800</pubDate><description><![CDATA[Lists and Keys下面是JavaScript使用map()历一个数组，在React中可以使用元素列表来实现相同操作。//javascript take an array and double them
const numbers = [1,2,3,4,5];
const doubled = numbers.map((number) => number * 2);
console.log(d]]></description><category></category></item><item><title><![CDATA[React官方文档--Conditional Rendering]]></title><link>https://blog.csdn.net/cithegod/article/details/52995980</link><guid>https://blog.csdn.net/cithegod/article/details/52995980</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 14:58:31 +0800</pubDate><description><![CDATA[Conditional Rendering在React中，你可以创建不同的组件，并且渲染其中的一部分，这取决于你应用的状态。 
状态渲染和JavaScript中的分支运算符有一样的效果，使用JavaScript中的类似if运算符来创建元素来代表当前状态，然后让React更新UI去匹配。 
我们创建了一个Greeting组件去显示，显示的结果取决于用户是否登录。//two components
fun]]></description><category></category></item><item><title><![CDATA[React官方文档--Handling Events]]></title><link>https://blog.csdn.net/cithegod/article/details/52995974</link><guid>https://blog.csdn.net/cithegod/article/details/52995974</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 14:57:53 +0800</pubDate><description><![CDATA[Handling EventsReact元素的事件处理非常类似于对DOM元素添加事件处理，但有一部分的语法不同。 
1. React事件使用camelCase来进行命名，而不是小写字母 
2. JSX需要传递一个函数作为事件处理函数，而不是一个字符串。//DOM元素的事件处理函数
<button onclick="activateLaser()">
    Activate Lasers
</but]]></description><category></category></item><item><title><![CDATA[React官方文档--State and Lifecycle]]></title><link>https://blog.csdn.net/cithegod/article/details/52995962</link><guid>https://blog.csdn.net/cithegod/article/details/52995962</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 14:57:20 +0800</pubDate><description><![CDATA[state and leftcycle使用class来定义组件通过五个步骤来创建一个自动刷新的时钟： 
1. 创建一个ES6 class 并且 extends React.Component 
2. 添加一个空方法叫做render 
3. 将函数体移动到render方法里面 
4. 在render内部，使用this.props来取代props 
5. 删除之前的函数声明和定义class Clock]]></description><category></category></item><item><title><![CDATA[React官方文档--Rendering Elements]]></title><link>https://blog.csdn.net/cithegod/article/details/52995940</link><guid>https://blog.csdn.net/cithegod/article/details/52995940</guid><author>cithegod</author><pubDate>Tue, 01 Nov 2016 14:56:13 +0800</pubDate><description><![CDATA[Rendering Elements元素是React app里面的最小的一个模块，而且React中的DOM元素都是一些基本的元素，很容易进行创建，虚拟的DOM对象创建起来成本很低。将一个元素渲染到DOM中创建一个<div>标签在HTML文件当中，现在可以通过ReactDOM将这些节点添加到这个标签中，将一个虚拟的React元素渲染到DOM中，可以使用ReactDOM.render()方法const]]></description><category></category></item></channel></rss>