7. 渲染一个木偶组件
import React from 'react';
function NotFound(props) {
return (
<div>NotFound</div>
)
}
export default NotFound;
8.ES5的时候,一个页面可以有多个React.createClass,同理在class类中一个页面中也可以有多个class类
import React, { Component } from 'react'
import Footer from '../../views/footer'
class BaseComponent extends Component {
render() {
return(
<div> 123456 </div>
)
}
}
class Group extends Component {
constructor(props) {
super(props)
this.state = {
networkList: []
}
}
render() {
return (
<div>
<BaseComponent/>
<Footer text = '在 App 中刷广播更愉快'/>
</div>
)
}
}
export default Group;