随笔分类 -  react

react相关技术
摘要:1)安装react-router到项目中 2)配置路由实现页面切换 <BrowserRouter> 使用 HTML5 提供的 history API (pushState, replaceState 和 popstate事件) 来保持 UI 和 URL 的同步。 <HashRouter> 使用 UR 阅读全文
posted @ 2019-03-29 17:59 燃烧小火苗 阅读(1932) 评论(0) 推荐(0)
摘要:npm start -> npm run serve -> 执行node ../node_modules/@vue/cli-service/bin/vue-cli-service.js serve 阅读全文
posted @ 2019-03-29 15:23 燃烧小火苗 阅读(4066) 评论(0) 推荐(0)
摘要:1、在项目中安装redux插件 npm install redux -S 2、针对单独的view组件定义store状态存储对象,参数为对状态的更新操作函数 3、在view组件中引入store状态存储对象,并且在constructor中监听状态的变化,更新view上的数据 阅读全文
posted @ 2019-03-28 18:00 燃烧小火苗 阅读(800) 评论(0) 推荐(1)