{
  "$schema": "https://json-schema.org/schema",
  "cli": "nx",
  "$id": "redux",
  "title": "Create Redux state",
  "description": "Create a Redux state slice for a React project.",
  "type": "object",
  "examples": [
    {
      "description": "Generate a Redux state slice with the exported symbol matching the file name. It results in the slice `fooSlice` at `mylib/src/lib/foo.slice.ts`",
      "command": "nx g @nx/react:redux mylib/src/lib/foo.slice.ts"
    },
    {
      "description": "Generate a Redux state slice with the exported symbol different from the file name. It results in the slice `customSlice` at `mylib/src/lib/foo.slice.ts`",
      "command": "nx g @nx/react:redux mylib/src/lib/foo.slice.ts --name=custom"
    },
    {
      "description": "Generate a Redux state slice without providing the \"slice\" suffix and the file extension. It results in the slice `fooSlice` at `mylib/src/lib/foo.slice.ts`",
      "command": "nx g @nx/react:redux mylib/src/lib/foo"
    }
  ],
  "properties": {
    "path": {
      "type": "string",
      "description": "The file path to the Redux state slice. Relative to the current working directory.",
      "$default": {
        "$source": "argv",
        "index": 0
      },
      "x-prompt": "What is the Redux stateslice file path?",
      "x-priority": "important"
    },
    "name": {
      "type": "string",
      "description": "The Redux state slice symbol name. Defaults to the last segment of the file path."
    },
    "appProject": {
      "type": "string",
      "description": "The application project to add the slice to.",
      "alias": "a"
    },
    "js": {
      "type": "boolean",
      "description": "Generate JavaScript files rather than TypeScript files.",
      "x-deprecated": "Provide the full file path including the file extension in the `path` option. This option will be removed in Nx v21."
    }
  },
  "required": ["path"]
}
