React 打印 hello world

52 阅读1分钟

demo-hello-world:打印 hello world 并且罗列 React 项目生态

  • 基于Vite创建项目
  • 罗列 React 生态

代码仓库

github.com/chuxin-cs/r…

Development

# 下载项目
git clone https://github.com/chuxin-cs/react-demo.git
# 进入 demo-hello-world
cd demo-hello-world
# 下载项目依赖
pnpm i
# 项目启动
pnpm dev

功能实现

Vite Create Project

1、创建项目

pnpm create vite demo-hello-world --template react-ts

2、App.tsx:

function App() {
  return (
    <>
      <h1>hello world</h1>
    </>
  );
}
export default App;

React 生态

路由

pnpm add react-router -S

UI 组件库

pnpm add antd @ant-design/icons @ant-design/pro-components -S

状态

pnpm add zustand -S

hooks

pnpm add immer use-immer ahooks -S

工具类

pnpm add axios dayjs nprogress -S

动画

pnpm add framer-motion -S

其他

// 错误 和 修改 title
pnpm add react-error-boundary react-helmet-async -S