@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:

Show what will be generated without writing to disk:

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

Options

name

Required
string

Redux slice name.

directory

dir
string
Default:

The name of the folder used to contain/group the generated Redux files.

project

p
string

The name of the project to add the slice to. If it is an application, then the store configuration will be updated too.

appProject

a
string

The application project to add the slice to.

js

boolean
Default: false

Generate JavaScript files rather than TypeScript files.