react 使用笔记

1.学习:https://reactjs.bootcss.com/learn

2.项目启动报错:Delete prettier/prettier

解决:https://blog.csdn.net/qq_30272167/article/details/133280165

3.访问地址配置

文件:config-overrides.js

javascript 复制代码
devServer: function (configFunction) {
  return function (proxy, allowedHost) {
    const config = configFunction(proxy, allowedHost);
    config.proxy = {
      "/api": {
        // target: "http://10.30.1.12",//服务器
        target: "http://localhost:9999",//测试
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    };
    return config;
  };
},

4.菜单路由配置

router=》module=》pages.js

javascript 复制代码
// 单位配置
  {
    path: "/vip/configure",
    component: React.lazy(() => import("@/pages/vip/configure")),
    permis: false,
  },

其中:pages/vip/configure 指的是页面路径,默认访问index.jsx页面

相关推荐
blns_yxl2 分钟前
拖拽排序列表(HTML+JS)
前端·javascript·html
Data3 分钟前
把 React 前端做成「插件市场」:前后端联动的行业包可插拔架构
前端
光影少年4 分钟前
RN Bridge 原理
前端·react native·react.js
daols8812 分钟前
vue vxe-context-menu 通用右键菜单组件使用
前端·javascript·vue.js·vxeui
程序员黑豆12 分钟前
鸿蒙应用开发实战:轻松实现列表上拉加载更多
前端·华为·harmonyos
hamber31 分钟前
GoGBA 上架半年记
前端
IT_陈寒35 分钟前
Python的finally居然不等同于Go的defer,差点坑惨我
前端·人工智能·后端
恋猫de小郭36 分钟前
给 AI 的 Agent 实现指南,可控 Agent 的关键
前端·人工智能·ai编程
米码收割机40 分钟前
【Python】Flask+SQLite_web 宠物领养系统 (源码+文档)【独一无二】
前端·python·flask
寒水馨1 小时前
macOS下载、安装 Tailwind CSS-v4.3.3(附安装包tailwindcss-macos-arm64)
前端·css·macos·tailwind css·utility-first·css 框架·实用优先