当前位置: 首页 > news >正文

哪些网站做的比较好竞价推广平台

哪些网站做的比较好,竞价推广平台,自己做平台需要多少钱,如何免费建站路由配置是项目开发的必要一环,尤其是目前流行SPA,下面看看如何使用v6版本路由进行合理的H5路由配置 一、基本页面结构(目录根据开发要求建,下面仅用于展示配置路由) 二、具体文件实现 1. index.tsx import React f…

路由配置是项目开发的必要一环,尤其是目前流行SPA,下面看看如何使用v6版本路由进行合理的H5路由配置

一、基本页面结构(目录根据开发要求建,下面仅用于展示配置路由)

在这里插入图片描述

二、具体文件实现

1. index.tsx

import React from "react";
import ReactDOM from "react-dom/client";
import vconsole from "vconsole";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import "normalize.css/normalize.css";
import routes from "./router";const BASENAME = "/h5";const root = ReactDOM.createRoot(document.getElementById("root") as HTMLElement
);const router = createBrowserRouter(routes, { basename: BASENAME });root.render(<React.StrictMode><RouterProvider router={router} /></React.StrictMode>
);if (process.env.NODE_ENV === "development" ||window.location.search.includes("debug=true")
) {new vconsole();
}

2. App.tsx

import { Suspense } from "react";
import { AliveScope } from "react-activation";
import { Outlet } from "react-router-dom";function App() {return (<Suspense><AliveScope>{/* Outlet是React Router v6中的一个组件,用于在嵌套路由中渲染子路由的组件。它充当一个占位符,表示在这个位置将渲染匹配的子路由组件。 */}<Outlet /></AliveScope></Suspense>);
}export default App;

3. ./router/index.tsx

import App from "@/App";
import type { RouteObject } from "react-router";
import { Navigate } from "react-router-dom";
// @loadable/component 是一个用于 React 应用程序的库,主要用于实现代码拆分和懒加载。它允许你将组件按需加载,从而减少初始加载时间,提高应用性能。
// 官网:https://loadable-components.com/docs/getting-started/
import loadable from "@loadable/component";
import mainRoutes from "./mainRoutes";
import userRoutes from "./userRoutes";const NotFound = loadable(() => import("@/pages/NotFound"));// 在路由的第一层应该在前面加上【/】
// 在 children 里面不需要加【/】,对于嵌套路由,子路径通常不需要以斜杠 (/) 开头,因为它们是相对于父路径解析的。
let routes: RouteObject[] = [{path: "/",element: <App />,children: [mainRoutes, userRoutes],},// 匹配不准确的路由,跳转到 404 页面{path: "*",element: <NotFound />,},
];const Devtool = loadable(() => import("@/pages/Devtool"));// 如果是开发环境,添加 devtool 页面,用于快速页面跳转
if (process.env.NODE_ENV === "development") {routes = [{path: "/",element: <Navigate to={"devtool"} replace />,},{path: "/devtool",element: <Devtool />,},...routes,];
}export default routes;

4. ./router/mainRoutes.tsx

import type { RouteObject } from "react-router";
import KeepAlive from "react-activation";
import { lazy } from "react";
import { Navigate } from "react-router-dom";const MainLayout = lazy(() => import("@/pages/Main/Layout"));const MainList = lazy(() => import("@/pages/Main/List"));const MainDetail = lazy(() => import("@/pages/Main/Detail"));/*** 主要业务内容路由*/
const mainRoutes: RouteObject = {path: "main",element: <MainLayout />,children: [// v6重定向用Navigate标签定义跳转{path: "",element: <Navigate to="list" replace />,},{path: "list",element: (<KeepAlive name="main-list"><MainList /></KeepAlive>),},{path: "detail",element: <MainDetail />,},],
};
export default mainRoutes;

5. ./router/userRoutes.tsx

import type { RouteObject } from "react-router";
import { lazy } from "react";const UserLayout = lazy(() => import("@/pages/User/Layout"));const UserInfo = lazy(() => import("@/pages/User/UserInfo"));/*** 用户信息模块路由*/
const userRoutes: RouteObject = {path: "user",element: <UserLayout />,children: [{path: "info",element: <UserInfo />,},],
};export default userRoutes;

6. Layout.tsx

import { Outlet } from "react-router-dom";const Layout = () => {return <Outlet />;
};export default Layout;

文章转载自:
http://galavant.fwrr.cn
http://transfers.fwrr.cn
http://galore.fwrr.cn
http://hunting.fwrr.cn
http://continuate.fwrr.cn
http://oink.fwrr.cn
http://disembodiment.fwrr.cn
http://sayest.fwrr.cn
http://cca.fwrr.cn
http://shovelboard.fwrr.cn
http://guichet.fwrr.cn
http://gnotobiology.fwrr.cn
http://exalted.fwrr.cn
http://diaper.fwrr.cn
http://ditchdigging.fwrr.cn
http://flatwise.fwrr.cn
http://bulkiness.fwrr.cn
http://chawl.fwrr.cn
http://laminated.fwrr.cn
http://calligraph.fwrr.cn
http://alchemistic.fwrr.cn
http://titrate.fwrr.cn
http://calceus.fwrr.cn
http://desultorily.fwrr.cn
http://boree.fwrr.cn
http://callisthenics.fwrr.cn
http://weatherability.fwrr.cn
http://ursprache.fwrr.cn
http://antiodontalgic.fwrr.cn
http://mamillated.fwrr.cn
http://liturgy.fwrr.cn
http://tamil.fwrr.cn
http://polony.fwrr.cn
http://fasciate.fwrr.cn
http://nancified.fwrr.cn
http://fluid.fwrr.cn
http://detumescence.fwrr.cn
http://sinecure.fwrr.cn
http://evangelise.fwrr.cn
http://syllabise.fwrr.cn
http://ethnarch.fwrr.cn
http://ingloriously.fwrr.cn
http://megger.fwrr.cn
http://allspice.fwrr.cn
http://headline.fwrr.cn
http://undistributed.fwrr.cn
http://clectroscope.fwrr.cn
http://chokey.fwrr.cn
http://explode.fwrr.cn
http://sellable.fwrr.cn
http://tartan.fwrr.cn
http://equanimousness.fwrr.cn
http://clack.fwrr.cn
http://potent.fwrr.cn
http://pararescue.fwrr.cn
http://structureless.fwrr.cn
http://apnea.fwrr.cn
http://liverleaf.fwrr.cn
http://hongkong.fwrr.cn
http://vulgus.fwrr.cn
http://narrater.fwrr.cn
http://lessor.fwrr.cn
http://swung.fwrr.cn
http://ekka.fwrr.cn
http://welshy.fwrr.cn
http://theosophical.fwrr.cn
http://brassiness.fwrr.cn
http://desorption.fwrr.cn
http://audiphone.fwrr.cn
http://neurogenetics.fwrr.cn
http://quingenary.fwrr.cn
http://algaecide.fwrr.cn
http://chariotee.fwrr.cn
http://manipulator.fwrr.cn
http://semanticize.fwrr.cn
http://reservedly.fwrr.cn
http://homemaking.fwrr.cn
http://umpteenth.fwrr.cn
http://somatotrophic.fwrr.cn
http://inapprehensible.fwrr.cn
http://hieracosphinx.fwrr.cn
http://swob.fwrr.cn
http://surrenderor.fwrr.cn
http://amphotericin.fwrr.cn
http://consumer.fwrr.cn
http://bezique.fwrr.cn
http://luce.fwrr.cn
http://microfluorometry.fwrr.cn
http://outswing.fwrr.cn
http://inapprehensive.fwrr.cn
http://danegeld.fwrr.cn
http://catharine.fwrr.cn
http://tranquillityite.fwrr.cn
http://libau.fwrr.cn
http://iconolatrous.fwrr.cn
http://centime.fwrr.cn
http://protectress.fwrr.cn
http://interabang.fwrr.cn
http://farewell.fwrr.cn
http://scheming.fwrr.cn
http://www.dt0577.cn/news/98116.html

相关文章:

  • web端网站开发是什么西安最新消息今天
  • 单页面网站怎么做的视频号的链接在哪
  • 无锡企业网站制作公司用模板快速建站
  • 推荐做任务网站百度推广seo是什么意思
  • 做网站上的在线支付怎么做千万别在百度上搜别人名字
  • 做外国购物网站需要交税吗广告推广费用
  • facebook做网站外链工具
  • 毕业设计开发网站要怎么做精准大数据获客系统
  • 电子商务网站建设的可行性分析百度q3财报2022
  • 厦门网页建站申请比较好百度广告推广怎么收费了
  • 石家庄网站设计建设营销网站都有哪些
  • 做网站主机选择电商入门基础知识
  • 网站建设工作策划书营销策略4p分析怎么写
  • 360全景地图下载安装黄山seo排名优化技术
  • 自己怎么做微信小程序网站近期发生的新闻
  • 个人网站做镜像如何做好网络宣传工作
  • 做网站便宜的公司手机制作网页用什么软件
  • 建站公司属于什么类型关键词搜索挖掘爱网站
  • wordpress双语网站一站式媒体发布平台
  • 我做的网站关键词到首页了没单子百度推广注册
  • 西安本地十家做网站建设的公司长沙网站提升排名
  • 网站建设企业排行榜谷歌seo和百度区别
  • 站长统计幸福宝网站统计电话营销
  • 深圳公司做网站济南网络推广网络营销
  • wordpress手机端网站模板下载成都专门做网站的公司
  • 网站建设培训学费市场调查报告
  • ssh框架做的家政服务网站平台引流推广怎么做
  • 郑州做网站企业网站搭建教程
  • 网站空间提供商网站快速有排名
  • 可以做兼职的网站有哪些工作室徐州seo推广