React Typescript 模板
此模板为开启 Typescript 的 React 项目提供入门级模板。它不使用 create-react-app,而是使用基本的 Babel/Webpack 设置来创建一个更加可定制的模板。该模板已预设好使用 Jest/RTL 进行测试,并使用 react-intl-hooks 实现本地化。主题特意留空,由用户决定(Material UI/Tailwind/Bootstrap 等)。 文档参考 npm,也可使用 yarn。
设置
- 安装 npm/yarn 并启动
推荐 VSCode 扩展
- 若干扩展可使 VSCode 开发更轻松
可用脚本
- npm run dev:开发模式运行应用
- npm test:React 测试库单元测试套件运行 JestRunner
- npm run build:dist 文件夹中创建静态 HTML/JS
- npm run start
react-typescript-template-main.zip
预估大小:24个文件
react-typescript-template-main
文件夹
.eslintrc.js
967B
webpack.config.js
1KB
.prettierignore
64B
src
文件夹
index.html
261B
index.tsx
153B
utils
文件夹
test-utils.tsx
1KB
components
文件夹
146.26KB
文件大小:
评论区