请问浏览器返回 react执行哪个函数?

浏览器返回 react执行哪个函数


子衿沉夜
浏览 1480回答 2
2回答

梵蒂冈之花

<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title></head><body><script src="./react-0.13.2/build/react.js"></script><script src="./react-0.13.2/build/JSXTransformer.js"></script><script type="text/jsx">var style = {color : "red",border: "1px #000 solid",};var HelloWorld = React.createClass({getDefaultProps: function(){console.log("getDefaultProps1");},getInitialState: function(){console.log("getInitialState2");return null;},componentWillMount:function(){console.log("componentWillMount3")},render: function(){console.log("render4");return <p>初始化阶段的函数执行状态</p>},componentDidMount:function(){console.log("componentDidMount5")}});React.render(<div style={style}><HelloWorld></HelloWorld></div>, document.body);</script></body>

守着一只汪

  回调,是非常基本的概念,尤其在现今NodeJS诞生与蓬勃发展中变得更加被人们重视。很多朋友学NodeJS,学很久一直摸不着门道,觉得最后在用Express写Web程序,有这样的感觉只能说明没有学懂NodeJS,本质上说不理解回调,就不理解NodeJS。  NodeJS有三大核心:- CallBack回调- Event事件- Stream流
打开App,查看更多内容
随时随地看视频慕课网APP