自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 TypeScript:try/catch踩坑:Object is of type ‘unknown‘

typescript :object is of type ‘unknown’

2022-10-03 17:22:17 2090 1

原创 Typescript报错expression of type string cannot be used to index

Typescript

2022-09-29 14:16:00 681

原创 Netlify部署出错:CI=true/page not found/Module not found

netlify部署react项目debug

2022-09-14 22:09:26 477

原创 React V6 编程式路由导航 useNavigate()要用函数式组件否则Hook报错

首先const navigate = useNavigate();则可以使用navigate这个函数代替this.history.push、this.history.replace、this.history.gofoward、this.history.goback、this.history.go1.注意:navigete默认history的是push模式,使用replace模式需要添加{replace:true} //开启replace模式2.注意:使用useNavigate()必须是在函数

2022-02-21 16:22:12 10879

原创 React-Router V6 params/research/state传参 函数式组件

V6版本中类组件中无法从props中接收到传递的参数解决方法:将类组件改为函数组件;使用useParams()和useLocation()接收参数;pages/Home/Messageimport React, { Component } from 'react'import { Link, Route, Routes,useParams } from 'react-router-dom'import Detail from './Detail'export default class

2022-02-21 13:25:50 1044

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除