# ngrx-migrate-actions

> Schematic for migrating ngrx6 actions and reducers to ngrx11

Latest version **1.0.5** (published 2021-11-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngrx-migrate-actions
pnpm add ngrx-migrate-actions
yarn add ngrx-migrate-actions
bun add ngrx-migrate-actions
```

## 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.5 |
| Published | 2021-11-24 |
| First published | 2021-02-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 21.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kishorays |
| Keywords | schematics |

## Links

- npm: https://www.npmjs.com/package/ngrx-migrate-actions
- npm.io page: https://npm.io/package/ngrx-migrate-actions

## Dependencies (3)

- [typescript](https://npm.io/package/typescript.md) ~4.1.2
- [@angular-devkit/core](https://npm.io/package/@angular-devkit/core.md) ^11.2.0
- [@angular-devkit/schematics](https://npm.io/package/@angular-devkit/schematics.md) ^11.2.0

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 1.0.5 (latest) — 2021-11-24
- 1.0.4 — 2021-06-20
- 1.0.3 — 2021-06-17
- 1.0.2 — 2021-06-17
- 1.0.1 — 2021-03-30
- 1.0.0 — 2021-02-18

## README

# Getting Started With ngrx-migrate-actions

This schematic can be used for migrating Ngrx6 actions and reducers to Ngrx11.

In Ngrx 6 actions are defined using classes like below.
```bash
export class LoginAction implements Action {
  readonly type = LOGIN;
  constructor(public userName: string, public password: string) { }
}
```

In Ngrx11, actions are created using `createAction` function.
```bash
export const LoginAction = createAction(
    '[LoginAction]',
    (userName: string, password: string) => ({ userName, password }),
);
```

### Usage

To use this in your project, install `ngrx-migrate-actions` and run one of below command. Reducer migrations still need more work.

```bash
yarn install ngrx-migrate-actions --dev // install using yarn
npm install -d ngrx-migrate-actions // install using npm
schematics .\node_modules\ngrx-migrate-actions\:convertReducers --filePath <folder which contains reducer files>
```

### For local development

```
npm run-script build
schematics .:convertReducers --filePath <file path> --dry-run=false
```

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