我为什么不再用 Vue,而改用 React?
Hello reader !
#myDiv {
display: block;
}
class MyComponent extends React.Component {
render() {
return( )
}
}
Vue.component({
template: ` `
})
return (
{students.map(student =>
{student}
)}
)
{{ student }}
class MyComponent extends React.Component {
constructor(props) {
super(props)
this.state = {
counter: 0
}
}
render() {
return( )
}
}
function MyComponent() {
const [counter, setCounter] = useState(0)
return( )
}
关注我,获资源干货
?关注 程序员干货分享
评论