{"_id":"@annaet/reduxjs-toolkit","name":"@annaet/reduxjs-toolkit","dist-tags":{"latest":"1.9.6"},"versions":{"1.9.6":{"name":"@annaet/reduxjs-toolkit","version":"1.9.6","description":"Forked from @reduxjs to publish latest code while waiting for the official release","author":{"name":"Mark Erikson","email":"mark@isquaredsoftware.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/reduxjs/redux-toolkit.git"},"keywords":["redux","react","starter","toolkit","reducer","slice","immer","immutable","redux-toolkit"],"publishConfig":{"access":"public"},"main":"dist/index.js","module":"dist/redux-toolkit.esm.js","unpkg":"dist/redux-toolkit.umd.min.js","types":"dist/index.d.ts","devDependencies":{"@microsoft/api-extractor":"^7.13.2","@size-limit/preset-small-lib":"^4.11.0","@testing-library/react":"^13.3.0","@testing-library/user-event":"^13.1.5","@types/convert-source-map":"^1.5.1","@types/jest":"^27","@types/json-stringify-safe":"^5.0.0","@types/nanoid":"^2.1.0","@types/node":"^10.14.4","@types/query-string":"^6.3.0","@types/react":"^18.0.12","@types/react-dom":"^18.0.5","@types/yargs":"^16.0.1","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","axios":"^0.19.2","console-testing-library":"^0.3.1","convert-source-map":"^1.7.0","esbuild":"^0.11.13","eslint":"^7.25.0","eslint-config-prettier":"^8.3.0","eslint-config-react-app":"^7.0.1","eslint-plugin-flowtype":"^5.7.2","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-prettier":"^3.4.0","eslint-plugin-react":"^7.23.2","eslint-plugin-react-hooks":"^4.2.0","fs-extra":"^9.1.0","invariant":"^2.2.4","jest":"^27","json-stringify-safe":"^5.0.1","magic-string":"^0.25.7","merge-source-map":"^1.1.0","msw":"^0.40.2","node-fetch":"^2.6.1","prettier":"^2.2.1","query-string":"^7.0.1","rimraf":"^3.0.2","rollup":"^2.47.0","rollup-plugin-strip-code":"^0.2.6","size-limit":"^4.11.0","source-map":"^0.7.3","terser":"^5.6.1","ts-jest":"^27","tslib":"^1.10.0","typescript":"~4.2.4","yargs":"^15.3.1"},"scripts":{"build-ci":"yarn rimraf dist && yarn tsc && yarn lint && node scripts/cli.js --skipExtraction","build-prepare":"npm run build-ci","build":"yarn rimraf dist && yarn tsc && node scripts/cli.js --local --skipExtraction","build-only":"yarn rimraf dist && yarn tsc && node scripts/cli.js --skipExtraction","format":"prettier --write \"(src|examples)/**/*.{ts,tsx}\" \"**/*.md\"","format:check":"prettier --list-different \"(src|examples)/**/*.{ts,tsx}\" \"docs/*/**.md\"","lint":"eslint src","test":"jest --runInBand","type-tests":"yarn tsc -p src/tests/tsconfig.typetests.json && yarn tsc -p src/query/tests/tsconfig.typetests.json","prepack":"npm run build-prepare"},"dependencies":{"immer":"^9.0.21","redux":"^4.2.1","redux-thunk":"^2.4.2","reselect":"^4.1.8"},"peerDependencies":{"react":"^16.9.0 || ^17.0.0 || ^18","react-redux":"^7.2.1 || ^8.0.2"},"peerDependenciesMeta":{"react":{"optional":true},"react-redux":{"optional":true}},"sideEffects":false,"bugs":{"url":"https://github.com/reduxjs/redux-toolkit/issues"},"homepage":"https://redux-toolkit.js.org","gitHead":"89f282a75927b463fca24ab7ede95f7819b62293","_id":"@annaet/reduxjs-toolkit@1.9.6","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-1t6xPg/oZhRIYjlc7CwEH2lkode7F9HYhvFdsDKMBrpUukbsFxGySxZGEKxJxczP5OGeUyvS2mCMp5UbFgMB2w==","shasum":"0da8a83d289f4623d45063f23bcd076452d1dd5b","tarball":"https://registry.npmjs.org/@annaet/reduxjs-toolkit/-/reduxjs-toolkit-1.9.6.tgz","fileCount":291,"unpackedSize":12630115,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFrUT8oQRP+I724uuYVt9P8dbQnnIhooU30AWYX0yg+wIga1wUeMsrgT1tadOl8V8GoBOFx2qtsPoLHcj6TbUHIVo="}]},"_npmUser":{"name":"annaet","email":"me@annaet.com"},"directories":{},"maintainers":[{"name":"annaet","email":"me@annaet.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reduxjs-toolkit_1.9.6_1687858513180_0.13969886862767544"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-27T09:35:13.108Z","1.9.6":"2023-06-27T09:35:13.492Z","modified":"2023-06-27T09:35:13.710Z"},"maintainers":[{"name":"annaet","email":"me@annaet.com"}],"description":"Forked from @reduxjs to publish latest code while waiting for the official release","homepage":"https://redux-toolkit.js.org","keywords":["redux","react","starter","toolkit","reducer","slice","immer","immutable","redux-toolkit"],"repository":{"type":"git","url":"git+https://github.com/reduxjs/redux-toolkit.git"},"author":{"name":"Mark Erikson","email":"mark@isquaredsoftware.com"},"bugs":{"url":"https://github.com/reduxjs/redux-toolkit/issues"},"license":"MIT","readme":"# Redux Toolkit\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/reduxjs/redux-toolkit/tests.yml?style=flat-square)\n[![npm version](https://img.shields.io/npm/v/@reduxjs/toolkit.svg?style=flat-square)](https://www.npmjs.com/package/@reduxjs/toolkit)\n[![npm downloads](https://img.shields.io/npm/dm/@reduxjs/toolkit.svg?style=flat-square&label=RTK+downloads)](https://www.npmjs.com/package/@reduxjs/toolkit)\n\n**The official, opinionated, batteries-included toolset for efficient Redux development**\n\n(Formerly known as \"Redux Starter Kit\")\n\n## Installation\n\n### Using Create React App\n\nThe recommended way to start new apps with React and Redux Toolkit is by using the [official Redux+JS template](https://github.com/reduxjs/cra-template-redux) for [Create React App](https://github.com/facebook/create-react-app), which takes advantage of React Redux's integration with React components.\n\n```sh\nnpx create-react-app my-app --template redux\n```\n\nOr if you are a TypeScript user, use [cra-template-redux-typescript](https://github.com/reduxjs/cra-template-redux-typescript), which is based on that template\n\n```sh\nnpx create-react-app my-app --template redux-typescript\n```\n\n### An Existing App\n\nRedux Toolkit is available as a package on NPM for use with a module bundler or in a Node application:\n\n```bash\n# NPM\nnpm install @reduxjs/toolkit\n\n# Yarn\nyarn add @reduxjs/toolkit\n```\n\nIt is also available as a precompiled UMD package that defines a `window.RTK` global variable.\nThe UMD package can be used as a [`<script>` tag](https://unpkg.com/@reduxjs/toolkit/dist/redux-toolkit.umd.js) directly.\n\n## Purpose\n\nThe **Redux Toolkit** package is intended to be the standard way to write Redux logic. It was originally created to help address three common concerns about Redux:\n\n- \"Configuring a Redux store is too complicated\"\n- \"I have to add a lot of packages to get Redux to do anything useful\"\n- \"Redux requires too much boilerplate code\"\n\nWe can't solve every use case, but in the spirit of [`create-react-app`](https://github.com/facebook/create-react-app), we can try to provide some tools that abstract over the setup process and handle the most common use cases, as well as include some useful utilities that will let the user simplify their application code.\n\nBecause of that, this package is deliberately limited in scope. It does _not_ address concepts like \"reusable encapsulated Redux modules\", folder or file structures, managing entity relationships in the store, and so on.\n\nRedux Toolkit also includes a powerful data fetching and caching capability that we've dubbed \"RTK Query\". It's included in the package as a separate set of entry points. It's optional, but can eliminate the need to hand-write data fetching logic yourself.\n\n## What's Included\n\nRedux Toolkit includes these APIs:\n\n- `configureStore()`: wraps `createStore` to provide simplified configuration options and good defaults. It can automatically combine your slice reducers, add whatever Redux middleware you supply, includes `redux-thunk` by default, and enables use of the Redux DevTools Extension.\n- `createReducer()`: lets you supply a lookup table of action types to case reducer functions, rather than writing switch statements. In addition, it automatically uses the [`immer` library](https://github.com/mweststrate/immer) to let you write simpler immutable updates with normal mutative code, like `state.todos[3].completed = true`.\n- `createAction()`: generates an action creator function for the given action type string. The function itself has `toString()` defined, so that it can be used in place of the type constant.\n- `createSlice()`: combines  `createReducer()` + `createAction()`. Accepts an object of reducer functions, a slice name, and an initial state value, and automatically generates a slice reducer with corresponding action creators and action types.\n- `createListenerMiddleware()`: lets you define \"listener\" entries that contain an \"effect\" callback with additional logic, and a way to specify when that callback should run based on dispatched actions or state changes. A lightweight alternative to Redux async middleware like sagas and observables. \n- `createAsyncThunk()`: accepts an action type string and a function that returns a promise, and generates a thunk that dispatches `pending/resolved/rejected` action types based on that promise\n- `createEntityAdapter()`: generates a set of reusable reducers and selectors to manage normalized data in the store\n- The `createSelector()` utility from the [Reselect](https://github.com/reduxjs/reselect) library, re-exported for ease of use.\n\n## RTK Query\n\n**RTK Query** is provided as an optional addon within the `@reduxjs/toolkit` package. It is purpose-built to solve the use case of data fetching and caching, supplying a compact, but powerful toolset to define an API interface layer for your app. It is intended to simplify common cases for loading data in a web application, eliminating the need to hand-write data fetching & caching logic yourself.\n\nRTK Query is built on top of the Redux Toolkit core for its implementation, using [Redux](https://redux.js.org/) internally for its architecture. Although knowledge of Redux and RTK are not required to use RTK Query, you should explore all of the additional global store management capabilities they provide, as well as installing the [Redux DevTools browser extension](https://github.com/reduxjs/redux-devtools), which works flawlessly with RTK Query to traverse and replay a timeline of your request & cache behavior.\n\nRTK Query is included within the installation of the core Redux Toolkit package. It is available via either of the two entry points below:\n\n```ts no-transpile\nimport { createApi } from '@reduxjs/toolkit/query'\n\n/* React-specific entry point that automatically generates\n   hooks corresponding to the defined endpoints */\nimport { createApi } from '@reduxjs/toolkit/query/react'\n```\n\n### What's included\n\nRTK Query includes these APIs:\n\n- `createApi()`: The core of RTK Query's functionality. It allows you to define a set of endpoints describe how to retrieve data from a series of endpoints, including configuration of how to fetch and transform that data. In most cases, you should use this once per app, with \"one API slice per base URL\" as a rule of thumb.\n- `fetchBaseQuery()`: A small wrapper around fetch that aims to simplify requests. Intended as the recommended baseQuery to be used in createApi for the majority of users.\n- `<ApiProvider />`: Can be used as a Provider if you do not already have a Redux store.\n- `setupListeners()`: A utility used to enable refetchOnMount and refetchOnReconnect behaviors.\n\nSee the [**RTK Query Overview**](https://redux-toolkit.js.org/rtk-query/overview) page for more details on what RTK Query is, what problems it solves, and how to use it.\n\n## Documentation\n\nThe Redux Toolkit docs are available at **https://redux-toolkit.js.org**.\n","readmeFilename":"README.md"}