摘要:
在next.config.js中,通过配置rewrites fallback来把请求代理到指定域名 module.exports = { ... async rewrites() { return { fallback: [ { source: '/:path*', destination: `ht 阅读全文
posted @ 2022-11-17 17:21
小菜菜爱吃菜
阅读(1093)
评论(0)
推荐(0)
摘要:
项目使用了ts 新建tsconfig.json { "compilerOptions": { ... "paths": { "@/*": ["src/*"] } } } 未使用ts 新建jsconfig.json { "compilerOptions": { ... "paths": { "@/*" 阅读全文
posted @ 2022-11-17 17:20
小菜菜爱吃菜
阅读(506)
评论(0)
推荐(0)
摘要:
React class render props mouse-position.js import React, { Component } from 'react' class MousePosition extends Component { constructor(props) { super 阅读全文
posted @ 2022-11-17 17:18
小菜菜爱吃菜
阅读(92)
评论(0)
推荐(0)
摘要:
useState useState,让函数组件拥有了维持状态的功能。维持状态是指在函数的多次渲染之间,这个state是可以在函数中间共享的 使用方式 import React, { useState } from 'react'; const Counter = () => { const [cou 阅读全文
posted @ 2022-11-17 17:12
小菜菜爱吃菜
阅读(140)
评论(0)
推荐(0)

浙公网安备 33010602011771号