![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
react
sillyyijia
前端\node\go
展开
-
react路由守卫
目录结构如下index.jsimport React from 'react';import ReactDOM from 'react-dom';import './index.css';import reportWebVitals from './reportWebVitals';import { HashRouter, Switch} from 'react-router-dom';import FrontendAuth from "./router/frontendAuth"Rea原创 2021-05-25 15:13:57 · 350 阅读 · 0 评论 -
react学习记录
index.html<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http...原创 2019-10-29 16:56:24 · 73 阅读 · 0 评论 -
react中state的改变和ref中的改变
今天终于有空再接着学习React,然而在代码尝试中发现一个问题,代码如下class Hello extends React.Component{ constructor(){ super() this.state = { data: "hello world" ...原创 2019-10-28 19:09:57 · 485 阅读 · 0 评论 -
第一天接触react
首次接触到react。 很明显的感觉到它与vue的相似之处,但目前我发现一点不同,vue在改变其data中的值后立马就能查到值的改变,而react是在render后其值才改变。 在我了解最基础的部分后,想着实践一下,于是出现了以下代码。其功能是类似抽奖的功能。其中有一点值得注意。在react中使用行内样式时,如transform的使用,不是用 style={{transform:`rotat...原创 2019-10-23 18:48:00 · 111 阅读 · 0 评论