Code Monkey home page Code Monkey logo

lego-web's Introduction

开发须知

构建

  • pnpm 包管理工具
  • vite 构建工具
  • typescript 默认开发语言

CSS 管理

  • tailwindcss 原子化 css 工具库,建议使用tailwindcss + css in js方案,放弃 less,sass 之类预处理工具。
  • emotion css in js

状态管理

fetch 网络请求

  • ky 网络请求工具

其他库

目录

  • comm 常量放于此
  • components 此项目组件放于此
  • pages 页面组件放在这里
  • services 页面逻辑抽象放 1

最佳实践

  • table + 查询 form 参考 home/index.tsx demo
  • 子页面容器,Header 设置,参考 home/index.tsx PageContainer
  • styled-components 建议使用 css in js 替换 css,less,提高 css 可维护性
  • 面包屑 开箱即用
  • fetch 请求 @/utils 暴露多个请求方式常规业务请求使用jsonPost方法
  • react query 的 useQuery 已添加默认请求方法,参数标准为长度至少为 1 的 Array,第一位为 url,第二位为请求参数,其他为监听字段

TODO LIST

  • 鉴权插件化使用

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.