import React from 'react';
import ReactDOM from 'react-dom';
import 'font-awesome/css/font-awesome.min.css';
import './index.css';
import './index.scss';
class A extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
Component A
</div>
)
}
}
class B extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>Component B</div>
)
}
}
class Wrapper extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
{this.props.children}
</div>
)
}
}
ReactDOM.render(
<Wrapper>
<A></A>
<B></B>
</Wrapper>,
document.getElementById('app')
);
深入了解React(十六、路由2)
最新推荐文章于 2024-08-02 10:43:58 发布