RepositoryTypeScript
vuejs

vuejs/pinia

🍍 Intuitive, type safe, light and flexible Store for Vue using the composition api with DevTools support

14.8kstars
1.2kforks
12issues
4views

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: composition-api

#1 Repository Của Tuần

2
TINIX TRENDING·Chủ đề: vuex

#2 Repository Của Tuần

2
TINIX TRENDING·Chủ đề: store

#2 Repository Của Tuần

🍍 Pinia: Vuex tiếp nghiên cấu trúc, là store cho thời đại Composition API

Pinia là lựa chọn thông minh nhất để quản lý trạng thái trong dự án Vue hiện đại — nhẹ, an toàn kiểu, mạnh mẽ DevTools.

Pinia là thư viện quản lý trạng thái (store) cho Vue, được xây dựng dựa trên Composition API. Được phát triển bởi cộng đồng Vue (vuejs), Pinia ra đời như kế nhiệm tự nhiên của Vuex. Tên "Pinia" xuất phát từ cách đọc tiếng Tây Ban Nha của từ "piña" (thơm), gợi nhớ đến quả khói — một nhóm hoa kết hợp thành quả chín. Tương tự như vậy, mỗi store trong Pinia độc lập nhưng kết nối chặt chẽ.

✨ Điểm nổi bật

  • Intuitive (Trực quan): Cú pháp đơn giản, dễ đọc, giống Vue. defineStore() trực tiếp nhận state, getters, actions.
  • Type Safe (An toàn kiểu): TypeScript được hỗ trợ tốt, tự động suy diễn kiểu cho state, getters, actions.
  • Devtools (Hỗ trợ DevTools): Gỡ lỗi trực tiếp trên trình duyệt, theo dõi thay đổi state, thời gian thực.
  • Extensible (Mở rộng linh hoạt): Plugin hỗ trợ thêm middleware, persistence, hoặc tích hợp backend tùy chỉnh.
  • Modular by design (Mô-đun sẵn): Tách store thành nhiều module nhỏ, dễ quản lý và tái sử dụng.
  • Extremely light (Cực kỳ nhẹ): Chỉ ~1KB gzipped, không ràng buộc nặng.
  • Nuxt Module (Hỗ trợ Nuxt): Tích hợp sẵn với Nuxt 3, SSR/SSG dễ dàng.

💡 Vì sao đáng chú ý

Khác với Vuex cũng có kiến trúc module phức tạp, Pinia đưa trải nghiệm viết store gần gũi với logic thành phần Vue. Không cần viết mutations hay boilerplate dài dằng dười. Đặc biệt với TypeScript, Pinia tự động nhận diện kiểu dữ liệu, giảm lỗi runtime.

Phù hợp cho mọi dự án Vue 3 từ nhỏ lẻ đến doanh nghiệp, cũng như các ứng dụng Nuxt 3 cần SSR. Đây là tiêu chuẩn mới cho quản lý trạng thái trong hệ sinh thái Vue.


#Vue #Pinia #Vue3 #CompositionAPI #StateManagement #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

212.6k
Oct 10, 2024
RepositoryJavaScript
vuejs/vuex

🗃️ Centralized State Management for Vue.js.

28.3k
Sep 25, 2024
RepositoryJavaScript
PanJiaChen/vue-admin-template

a vue2.0 minimal admin template

20.3k
Apr 27, 2024
RepositoryJavaScript
posva/vuex-mock-store

✅Simple and straightforward Vuex Store mock for vue-test-utils

270
Nov 16, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.9k
Dec 2, 2026
RepositoryTypeScript
nilbuild/developer-roadmap

Interactive roadmaps, guides and other educational content to help developers grow in their careers.

373.1k
Dec 1, 2026
RepositoryTypeScript
firecrawl/firecrawl

Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.

215.1k
Dec 2, 2026
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

379.9k
Sep 15, 2026