# pinia-plugin-created

> create created lifecycle method in your pinia 🍍 store!

Latest version **1.0.0** (published 2023-05-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install pinia-plugin-created
pnpm add pinia-plugin-created
yarn add pinia-plugin-created
bun add pinia-plugin-created
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-05-17 |
| First published | 2023-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | zhennann |
| Maintainers | zhennann |
| Keywords | pinia, plugin, created |

## Links

- npm: https://www.npmjs.com/package/pinia-plugin-created
- Repository: https://github.com/zhennann/pinia-plugin-created
- Homepage: https://github.com/zhennann/pinia-plugin-created#readme
- Issues: https://github.com/zhennann/pinia-plugin-created/issues
- npm.io page: https://npm.io/package/pinia-plugin-created

## Recent versions

- 1.0.0 (latest) — 2023-05-17

## README

Support `created` lifecycle hook in your pinia 🍍 store!

## Installation

```sh
npm install pinia-plugin-created
```

## Usage

```js
import Vue from 'vue';
import { createPinia, PiniaVuePlugin, defineStore } from 'pinia';
import { PiniaPluginCreated } from 'pinia-plugin-created';

// install pinia
Vue.use(PiniaVuePlugin);

// create pinia
const pinia = new createPinia();

// install pinia plugin
pinia.use(PiniaPluginCreated);
```

You can then use a `created` option in your stores:

```js
defineStore('id', {
  state() {
    return {
      ...
    };
  },
  created() {
    ...
  },
  actions: {
    ...
  },
})
```

## License

MIT

---
_Source: https://npm.io/package/pinia-plugin-created · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
