# Tencent/westore

小程序MVVM分层架构

Repository: https://github.com/Tencent/westore
Canonical: https://ross.abutalabs.com/products/westore
Language: JavaScript
License Family: other
Topics: weapp, store, state, state-management, miniprogram, setdata, setstate, update, diff, json-diff, mp, web, westore, mvc, mvp, mvvm, model
Last push: 2026-05-01T04:39:55+00:00

## Health v2 (maintenance only)
Score: 68/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 80, release rhythm 35, longevity 100
- inputs: {"age_days": 4136, "days_push": 124, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4284, forks 478 (observed 2026-08-28T04:08:41.252243+00:00)

## What it is
Westore is a Tencent open-source library providing an MVVM layered architecture for WeChat Mini Programs. It replaces direct setData calls with a Store-based update mechanism using deepClone and JSON diffing to compute minimal data update paths.

## Use cases
- manage state in wechat mini programs
- avoid bloated page and component logic in miniprogram apps
- replace setData with a single update call
- structure mini program code with MVC/MVP/MVVM patterns
- write platform-independent business model code
- minimize setData payload with  diff

## When to choose
- building WeChat Mini Programs with complex business logic
- you want a thin view layer and testable model separation
- you need minimal setData paths for performance

## When to avoid
- building non-miniprogram web apps where standard state libraries fit better
- very simple mini programs where the architecture adds overhead
- you need a project with a permissive license guarantee (no license file)

## Facets
- artifact type: library
- maturity: active
- function: state-management, frontend-framework
- domain: web-development, frontend, developer-tools
- platform: -
- tags: weapp, miniprogram, mvvm, setdata, -diff, store-pattern, javascript, wechat, web

## Member repositories
- Tencent/westore (main) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:41.252243+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:57.207298+00:00, confidence not recorded.
  - readme: https://github.com/Tencent/westore (fetched 2026-08-28T04:08:41.252243+00:00, sha 6f1e890811ea)
- Data as of 2026-08-30T08:39:29.467469+00:00.
