01. React-MP
Create Project
pnpm create esboot --upstream --url <your-project-git-url>
Template Philosophy
This multi-platform template is designed to keep developers focused on their current page instead of repeatedly solving infrastructure bugs.
Key ideas:
- maximize cross-platform code reuse
- prefer
react-query - standardize request handling with
dz-axios - improve debugging efficiency
- keep projects synchronized with the upstream template through cherry-picking
What This Template Solves
- standardized native/browser interaction wiring
- standardized user config shaping for different platforms
- helper layers for platform-specific integration points
- consistent network request instances and middleware patterns
- multi-level i18n structure for large MP projects
Create Your Own Page
Run the page generator script from package.json:
pnpm create-page
Request Layer
The template recommends:
dz-axiosfor standardized request instances- middleware-based auth and business-error handling
react-queryfor caching, retry behavior, and view-layer simplicity
Project Structure
The template contains:
configfor platform configdocsfor project docssrcfor source codesrc/apifor backend API wrapperssrc/platforms/*for platform-specific resources