@nx/react:redux
Create a Redux state slice for a React project.
The State of JS survey is live, featuring a monorepo tools sectionThe State of JS survey is live, featuring a monorepo tools sectionVote for us
Create a Redux state slice for a React project.
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
Redux slice name.
The directory at which to create the Redux files. When --nameAndDirectoryFormat=as-provided
, it will be relative to the current working directory. Otherwise, it will be relative to the project root.
The application project to add the slice to.
false
Generate JavaScript files rather than TypeScript files.
as-provided
, derived
Whether to generate the component in the directory as provided, relative to the current working directory and ignoring the project (as-provided
) or generate it using the project and directory relative to the workspace root (derived
).
The name of the project to add the slice to. If it is an application, then the store configuration will be updated too.
Provide the directory
option instead and use the as-provided
format. The project will be determined from the directory provided. It will be removed in Nx v18.