posts - 148,  comments - 4,  views - 15万
< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

随笔分类 -  react

在移动端语言react中使用video.js
摘要:在video.js基础上封装了一个reactVideo弹窗组件 npm install video.js --save 首先npm 安装video.js 1 //ReactVideo.tsx 2 import React, { Component, Fragment } from 'react'; 阅读全文
posted @ 2021-01-07 20:40 执候 阅读(1576) 评论(0) 推荐(0) 编辑
react表单
摘要://首先简单介绍受控组件,每个都要去change事件触发 import React from 'react' class Form extends React.Component { constructor(props) { super(props); this.state = { username 阅读全文
posted @ 2020-05-31 22:26 执候 阅读(181) 评论(0) 推荐(0) 编辑
react从入门到熟悉(回顾react)
摘要:首先npm和node环境就不说了,不懂得参考我写的vue2.0安装,里面有npm和node安装的介绍react开发参考官网创建react项目搭建开发环境,安装的是最新版npx create-react-app my-app(这个是项目名称)安装完成后cd my-app 直接npm run start 阅读全文
posted @ 2020-05-31 10:40 执候 阅读(274) 评论(0) 推荐(0) 编辑
react生命周期
摘要:图是百度来的 图有一处错误componentWillReceiveProps图上是错的 1 componentWillMount:在组件渲染之前执行2 componentDidMount:在组件渲染之后执行3 shouldComponentUpdate :返回true和false,true代表允许改 阅读全文
posted @ 2020-05-24 23:23 执候 阅读(152) 评论(0) 推荐(0) 编辑
react事件处理条件渲染列表循环
摘要:1条件判断与渲染 1 class ParentCom extends React.Component{ 2 constructor(props){ 3 super(props) 4 this.state = { 5 isLogin:true 6 } 7 } 8 render(){ 9 if(this 阅读全文
posted @ 2020-04-12 12:13 执候 阅读(780) 评论(0) 推荐(0) 编辑
react-router-dom
摘要:先说概念 react-router: 实现了路由的核心功能 react-router-dom: 基于react-router,加入了在浏览器运行环境下的一些功能,例如:Link组件,会渲染一个a标签,Link组件源码a标签行; BrowserRouter和HashRouter组件,前者使用pushS 阅读全文
posted @ 2019-12-08 17:06 执候 阅读(932) 评论(0) 推荐(0) 编辑
react todoList小demo
摘要:基于create-react-app做的小demo 比较简单直接上代码 效果图 阅读全文
posted @ 2019-12-07 17:26 执候 阅读(219) 评论(0) 推荐(0) 编辑
react项目基本搭建
摘要:使用的是create-react-app@3.1.1版本首先安装 npm install create-react-app -g然后创建文件 create-react-app react-test进入文件cd react-test运行npm run eject让文件吧webpack相关配置暴露出来, 阅读全文
posted @ 2019-11-20 15:21 执候 阅读(1234) 评论(0) 推荐(0) 编辑
react从简到难(一)
摘要:react脚手架搭建 1先建一个文件夹如:react-cli-basic2 npm init 创建page.json文件 回车就好 文件夹就多了一个page.json 3 react必须装的插件react react-dom babelify babel-preset-es2015 babel-pr 阅读全文
posted @ 2019-09-20 11:23 执候 阅读(415) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示