# Reset

npm

This is the official Harlem plugin for resetting stores to their initial state.

# Installation

Before installing the reset plugin make sure you have installed @harlem/core.

Install @harlem/plugin-reset:

npm install @harlem/plugin-reset
1

Or if you're using Yarn:

yarn add @harlem/plugin-reset
1

# Usage

Create an instance of the plugin and register it with Harlem:

import App from './app.vue';

import harlem from '@harlem/core';
import createResetPlugin from '@harlem/plugin-reset';

createApp(App)
    .use(harlem, {
        plugins: [
            createResetPlugin()
        ]
    })
    .mount('#app');
1
2
3
4
5
6
7
8
9
10
11
12

Call the reset method with the name of the store you wish to reset:

import {
    reset
} from '@harlem/plugin-reset';

export default function() {
    reset('my-store');
}
1
2
3
4
5
6
7