会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shamgod
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
38
39
40
41
42
43
44
45
46
···
52
下一页
2015年12月28日
HTML5 增强的页面元素
摘要: 一、HTML5 改良的 input 元素的种类1.var n1 = document.getElementById("num1").valueAsNumber;七、HTML5 增强的页面元素1.figure、figcaption 标签规定独立的流内容(图像、图表、照片、代码等等)。figure 元素...
阅读全文
posted @ 2015-12-28 23:48 shamgod
阅读(394)
评论(0)
推荐(0)
2015年12月27日
React开发项目例子
摘要: 一、需求1.分析:用react开发一个类似bootstrap4中的card组件http://v4-alpha.getbootstrap.com/components/card/,界面类似如下:2.确定发目标:3.确定开发顺序4.开发流程介绍测试采用TDD二、代码1.Card.js 1 var Rea...
阅读全文
posted @ 2015-12-27 14:59 shamgod
阅读(2613)
评论(0)
推荐(0)
2015年12月25日
用 React 编写SVG图表
摘要: 1.代码 1 2 3 4 5 万能的React 6 7 8 9 10 39 40 2.运行结果
阅读全文
posted @ 2015-12-25 21:22 shamgod
阅读(1149)
评论(0)
推荐(0)
用 React 编写2048游戏
摘要: 1.代码 1 2 3 4 5 万能的React 6 55 56 57 58 59 261 262 2.结果
阅读全文
posted @ 2015-12-25 20:42 shamgod
阅读(644)
评论(0)
推荐(1)
React测试Mixin
摘要: 1.test.jsx 1 var randomNumberMixin = require("./randomNumberMixin.jsx"); 2 3 describe("test randomNumberMixin", function () { 4 it("should return...
阅读全文
posted @ 2015-12-25 00:21 shamgod
阅读(364)
评论(0)
推荐(0)
2015年12月24日
React组件测试(模拟组件、函数和事件)
摘要: 一、模拟组件1.用到的工具(1)browerify(2)jasmine-react-helpers(3)rewireify(依赖注入)(4)命令:browserify - t reactify -t rewireify test1.jsx > app.js2.代码(1)test1.jsx 1 var...
阅读全文
posted @ 2015-12-24 23:21 shamgod
阅读(964)
评论(0)
推荐(0)
用React.addons.TestUtils、Jasmine进行单元测试
摘要: 一、用到的工具1.React.addons.TestUtils2.Jasmine3.Browserify(处理jsx文件的require依赖关系)4.Reactify(能和browserify很好的配合,把jsx转换为js)5.编译命令为browserify -t reactify test.jsx...
阅读全文
posted @ 2015-12-24 21:50 shamgod
阅读(1203)
评论(0)
推荐(0)
2015年12月23日
React gulp、Browserify、Webpack实例
摘要: 一、gulp 1 var gulp = require('gulp'); 2 var react = require('gulp-react'); 3 4 gulp.task('jsx', function() { 5 gulp.src('./app.jsx') 6 .pi...
阅读全文
posted @ 2015-12-23 21:48 shamgod
阅读(472)
评论(0)
推荐(0)
2015年12月21日
React-用Jest测试
摘要: 一、1.目录结构二、代码1.CheckboxWithLabel.jsx 1 var React = require('react/addons'); 2 var CheckboxWithLabel = React.createClass({ 3 getInitialState: functi...
阅读全文
posted @ 2015-12-21 22:45 shamgod
阅读(1503)
评论(0)
推荐(0)
2015年12月20日
React-Flux 介绍及实例演示
摘要: 一、Flux架构二、例子1.TodoApp.react.js 1 /** 2 * Copyright (c) 2014-2015, Facebook, Inc. 3 * All rights reserved. 4 * 5 * This source code is licensed und...
阅读全文
posted @ 2015-12-20 21:45 shamgod
阅读(496)
评论(0)
推荐(0)
上一页
1
···
38
39
40
41
42
43
44
45
46
···
52
下一页
公告
haha