摘要: render*参数1:需要渲染的DOM节点 或者组件 如何渲染的是标签则只需要写标签名称即可 如果是组件则需要按照标签的形式输写<App/>* 参数2:需要将渲染的这个节点挂载在哪里* 参数3回调 jsx语法中class需要改写成className for需要改写成htmlFor 如何创建一个组件 阅读全文
posted @ 2019-06-11 20:04 GaGaPei 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1、路由的安装 cnpm install react-router-dom -S 2、路由的方式 HashRouter: 带hash值的router vue hash BrowserRouter: 不带hash值的router vue history 注意: 1、路由的配置项必须在HashRoute 阅读全文
posted @ 2019-06-11 19:57 GaGaPei 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1、React中的生命周期有哪些? constructor componentWillMount render componentDidMount componentWillReceiveProps shouldComponentUpdate componentWillUpdate componen 阅读全文
posted @ 2019-06-11 19:52 GaGaPei 阅读(596) 评论(0) 推荐(0) 编辑
摘要: 虚拟dom个人理解 阅读全文
posted @ 2019-06-10 21:27 GaGaPei 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 当你把一个普通的 JavaScript 对象传入 Vue 实例作为 data 选项,Vue 将遍历此对象所有的属性,并使用 Object.defineProperty 把这些属性全部转为 getter/setter。Object.defineProperty 是 ES5 中一个无法 shim 的特性 阅读全文
posted @ 2019-05-27 19:51 GaGaPei 阅读(114) 评论(0) 推荐(0) 编辑