@nx/react:redux

Create a Redux state slice for a React project.

Usage

1nx generate redux ... 2
1nx g slice ... #same 2

By default, Nx will search for redux in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

1nx g @nx/react:redux ... 2

Show what will be generated without writing to disk:

1nx g redux ... --dry-run 2

Options

path

Required
string

The file path to the Redux state slice without the file extension (e.g. my-app/src/app/my-slice/my-slice generates the file my-app/src/app/my-slice/my-slice.ts). Relative to the current working directory.

appProject

a
string

The application project to add the slice to.

js

boolean
Default: false

Generate JavaScript files rather than TypeScript files.

name

string

The Redux state slice symbol name. It not provided, it defaults to the last segment of the provided path.