啥时候录 React+flux+react-router的教程
ReactJS中文视频教程 [百度网盘]
yangweijie
#49
我看来你的视频 第一讲,自己写了一下代码
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学些React!!!</title>
<script src="bower_components/react/react.js"></script>
<script src="bower_components/react/JSXTransformer.js"></script>
</head>
<body>
<div id="app"></div>
<script type="text/jsx">
var messageBox = React.createClass({
render: function(){
return ( <h1>世界你好</h1> )
}
});
React.render(
<messageBox/>,
document.getElementById('app'),
function(){
console.log('渲染完成了');
}
);
</script>
</body>
</html>
结果什么也出不来,
浏览器里显示这个 console.log也输出完成了。
能帮我看看是什么原因吗?
Sigma
#56
/**
* http://www.tudou.com/plcover/ah20h1-t4V4/
* 这个 React.js 教程的视频专辑竟然没有排序!
* @https://gist.github.com/g8up/3eabe158e9f5618ab15e
*/
JSON.stringify([].slice.call($('h6.caption>a'),0).map(function(a){
var title = $(a).text();
var _match = title.match(/\d+\./);
if( _match && _match.length ){
var index = title.match(/(\d+)\./)[1];
}else{
console.log('title',title);
index = null;
}
var href = a.href;
return {
name: title,
index: index,
href: href
};
}).sort(function(a,b){
return a.index - b.index;
}), null, '\t');