@nx/react:redux
Create a Redux state slice for a React project.
Create a Redux state slice for a React project.
1nx generate redux ...
21nx g slice ... #same
2By 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 ...
2Show what will be generated without writing to disk:
1nx g redux ... --dry-run
2Redux 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.
falseGenerate JavaScript files rather than TypeScript files.
as-provided, derivedWhether 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 v19.