react
react(git里搜索可下载)
react vue中文系 angular
jquery(能做的太少了) do more(samall)
react(原生App开发) vue angular
云 php /////node.js java c++ python ruby c# go erlang
=======================网络
端 html css js c objecy-c java
pc浏览器(网站) 手机浏览器(webApp) pad浏览器(网站)
手机app里有嵌入的浏览器(hybird APP)
原生app
---------------------------------------------------
atm 手表 眼睛 vr眼睛 电脑屏幕
es2015=es6ui
ecmascript 5
数组的方法
arr.push() 将括号里的东西放入数组里
arr.pop() 取数组的最后一个
arr.shift() 取数组第一个
arr.slice() 截取
arr.splice() 替换和截取
arr.join() 将数组的值连接到一起
arr.concat() 连接数组 原数组不变
arr.sort() 按照阿斯克码排序
arr.sort((a,b)=>a<b);反序
arr.map(v=>'.'+v)数值前加“.”
arr.forEach() 遍历数组
arr.map() 映射
arr.filter() 过滤 从原数组中获得一个更小的例子
本质都是对象 虚拟DOM
方法1 元素 每一个元素只能有一个父元素
var el=
this is h1
;方法2 组件
props 只要有值就能传
var root=document.querySelector('#container');
class Header extends React.Component{
render(){
//传递实参
return (
<h3 onClick={this.props.fn?()=>{this.props.fn('a')}:null}>
{this.props.number?{this.props.number}:null}
{this.props.float?{this.props.float}:null}
{this.props.string?{this.props.string}:null}
{this.props.el?{this.props.el}:null}
{this.props.fn?'this is fn':null}
);
}
}
class Page extends React.Component{
//只要是值就能传过去
render(){
return(
<Header fn={(x)=>{console.log(x)}}/>
<Header el={
);
}
}
ReactDOM.render(
//call apply bind(输出和原函数一模一样的函数)
//状态一旦发生变化页面就会自动更新
154
浙公网安备 33010602011771号