Skip to content

포매터 및 코드

Vue 3 + Pinia 스토어 생성기

Typed Pinia stores with state, getters and actions.

Runs in your browser
stores/user.ts
lines: 26chars: 431size: 431 B
live

편집자 노트

Understanding · State, derived state, mutations — one defineStore call.

이 심층 챕터는 현재 영어로만 제공됩니다. 위의 변환 도구는 귀하의 언어로 작동하지만, 긴 설명 글은 아직 번역되지 않았습니다.

자주 묻는 질문

Quick answers.

Does this support the Composition API?

Yes. You can toggle between the 'Option Store' syntax and the 'Setup Store' syntax, which uses the same pattern as the Vue 3 Composition API.

Is TypeScript supported?

Yes. The generator produces fully typed TypeScript code by default, ensuring your state and actions benefit from autocompletion and type checking.

How do I use the generated store?

After copying the code into your project, you can import the `useStore` function and call it inside your component's `setup` hook or `<script setup>` block.

Is my code data stored on your server?

No. The store structure you define remains entirely within your browser environment. No code or architectural data is ever transmitted or saved externally.

사람들이 다음도 검색합니다.

관련 도구

More in this room.

모두 보기 포매터 및 코드