miniprogram-best-practices

Provide Taro and WeChat Mini Program development guidelines for React 18, Zustand, SCSS Modules, and TypeScript.

Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Come0520/L2C --skill miniprogram-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: miniprogram-best-practices
Source: https://github.com/Come0520/L2C/tree/main/.agent/skills/miniprogram-best-practices
Command: npx skills add https://github.com/Come0520/L2C --skill miniprogram-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides essential guidelines to prevent common pitfalls and ensure efficient development when working with Taro and WeChat Mini Programs, saving development time and reducing bugs.

Core Features & Use Cases

  • Taro + React Best Practices: Covers file structure, component usage, and event handling.
  • WeChat Mini Program Rules: Enforces official guidelines for TabBar, sub-packages, and path management.
  • Project-Specific Architecture: Details the four-role TabBar system and role-based landing pages.
  • Use Case: Before starting any new feature involving navigation or data display in the WeChat Mini Program, consult this Skill to ensure adherence to established patterns and avoid common errors.

Quick Start

Review the miniprogram-best-practices skill to understand the correct way to import SCSS files for Taro pages.

Frequently Asked Questions about miniprogram-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for Taro and WeChat Mini Program development with React 18?

Taro and WeChat Mini Program best practices involve using React 18, Zustand, SCSS Modules, and TypeScript to prevent common pitfalls. These guidelines cover file structure, component usage, and event handling to reduce bugs and ensure efficient development.

How do I configure TabBar and sub-packages in a WeChat Mini Program?

Configure TabBar and sub-packages in a WeChat Mini Program by enforcing official WeChat rules for path management and sub-packages. This includes implementing a four-role TabBar system with role-based landing pages within the project architecture.

How do I import SCSS files correctly for Taro pages?

To import SCSS files correctly for Taro pages, review the established guidelines for SCSS Modules to ensure proper styling and avoid common errors. This approach maintains consistent styling within the Taro and WeChat Mini Program architecture.

Does Taro 4.x have specific issues with WeChat Mini Program performance optimization?

Taro 4.x has specific issues with WeChat Mini Program performance optimization that require targeted techniques. Address these version-specific problems alongside general performance optimization strategies to ensure efficient mini program execution.

Can I use Zustand for state management in a Taro WeChat Mini Program?

You can use Zustand for state management in a Taro WeChat Mini Program as part of the recommended technology stack. It integrates with React 18 and TypeScript within the four-role architecture to maintain state across role-based landing pages.

What are the limitations of WeChat official rules for TabBar path management?

Limitations of WeChat official rules for TabBar path management require strict adherence to established patterns to avoid common errors. Deviating from these guidelines when implementing role-based landing pages can break navigation and sub-package routing.