Skip to content

Commit 9216939

Browse files
authored
Rename RSK to Redux Toolkit (#250)
* Rework Quick Start and Usage Guide * Update sidebar to rename Usage and remove "Examples" * Update tutorials, except for sandbox links * Update API docs * Update Docusaurus site config * Update test issue URLs * Update package name in config files * Update README * Clean up irrelevant redirects and dead examples page * Change UMD global name * Try aligning badges * More alignment * Aligning... * Mark scoped package as public * Fix package name * 1.0.2 * Update description * Add netlify.toml file for build preview * Fix CodeSandbox CI file * Really fix package name i mean it * 1.0.3
1 parent d781668 commit 9216939

27 files changed

+164
-204
lines changed

.codesandbox/ci.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
// a list of sandboxes that you want generated for a PR, if this list
3-
// is not set we will default to `vanilla`. The built library will automatically
4-
// be installed in the fork of these sandboxes.
52
"sandboxes": [
63
"vanilla",
74
"vanilla-ts",

CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
redux-starter-kit.js.org
1+
redux-toolkit.js.org

README.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
# Redux Starter Kit
1+
# Redux Toolkit
22

3-
[![build status](https://img.shields.io/travis/reduxjs/redux-starter-kit/master.svg?style=flat-square)](https://travis-ci.org/reduxjs/redux-starter-kit)
3+
[![build status](https://img.shields.io/travis/reduxjs/toolkit/master.svg?style=flat-square)](https://travis-ci.org/reduxjs/redux-toolkit)
4+
[![npm version](https://img.shields.io/npm/v/@reduxjs/toolkit.svg?style=flat-square)](https://www.npmjs.com/package/@reduxjs/toolkit)
5+
[![npm downloads](https://img.shields.io/npm/dm/@reduxjs/toolkit.svg?style=flat-square)](https://www.npmjs.com/package/@reduxjs/toolkit) (RTK)
6+
[![npm downloads](https://img.shields.io/npm/dm/redux-starter-kit.svg?style=flat-square)](https://www.npmjs.com/package/redux-starter-kit) (RSK)
47

5-
[![npm version](https://img.shields.io/npm/v/redux-starter-kit.svg?style=flat-square)](https://www.npmjs.com/package/redux-starter-kit)
8+
**The official, opinionated, batteries-included toolset for efficient Redux development**
69

7-
[![npm downloads](https://img.shields.io/npm/dm/redux-starter-kit.svg?style=flat-square)](https://www.npmjs.com/package/redux-starter-kit)
10+
`npm install @reduxjs/toolkit`
811

9-
**A simple set of tools to make using Redux easier**
10-
11-
`npm install redux-starter-kit`
12-
13-
(Special thanks to Github user @shotak for donating to the package name.)
12+
(Formerly known as "Redux Starter Kit")
1413

1514
### Purpose
1615

17-
The Redux Starter Kit package is intended to help address three common concerns about Redux:
16+
The **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:
1817

1918
- "Configuring a Redux store is too complicated"
2019
- "I have to add a lot of packages to get Redux to do anything useful"
2120
- "Redux requires too much boilerplate code"
2221

2322
We can't solve every use case, but in the spirit of [`create-react-app`](https://github.com/facebook/create-react-app) and [`apollo-boost`](https://dev-blog.apollodata.com/zero-config-graphql-state-management-27b1f1b3c2c3), 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.
2423

25-
This package is _not_ intended to solve every possible concern about Redux, and is deliberately limited in scope. It does _not_ address concepts like "reusable encapsulated Redux modules", data fetching, folder or file structures, managing entity relationships in the store, and so on.
24+
This package is _not_ intended to solve every possible use case for Redux, and is deliberately limited in scope. It does _not_ address concepts like "reusable encapsulated Redux modules", data fetching, folder or file structures, managing entity relationships in the store, and so on.
2625

2726
### What's Included
2827

29-
Redux Starter Kit includes:
28+
Redux Toolkit includes:
3029

3130
- A `configureStore()` function with simplified configuration options. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes `redux-thunk` by default, and enables use of the Redux DevTools Extension.
3231
- A `createReducer()` utility that 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`.
@@ -36,6 +35,4 @@ Redux Starter Kit includes:
3635

3736
## Documentation
3837

39-
The Redux Starter Kit docs are now published at **https://redux-starter-kit.js.org**.
40-
41-
We're currently expanding and rewriting our docs content - check back soon for more updates!
38+
The Redux Toolkit docs are available at **https://redux-toolkit.js.org**.

docs/api/configureStore.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ of `[offline, applyMiddleware, devToolsExtension]`.
126126
### Basic Example
127127
128128
```js
129-
import { configureStore } from 'redux-starter-kit'
129+
import { configureStore } from '@reduxjs/toolkit'
130130

131131
import rootReducer from './reducers'
132132

@@ -137,7 +137,7 @@ const store = configureStore({ reducer: rootReducer })
137137
### Full Example
138138
139139
```js
140-
import { configureStore, getDefaultMiddleware } from 'redux-starter-kit'
140+
import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit'
141141

142142
// We'll use redux-logger just as an example of adding another middleware
143143
import logger from 'redux-logger'

docs/api/createAction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ This works because object keys that are not natively supported by JavaScript (li
103103
104104
In principle, Redux lets you use any kind of value as an action type. Instead of strings, you could theoretically use numbers, [symbols](https://developer.mozilla.org/en-US/docs/Glossary/Symbol), or anything else ([although it's recommended that the value should at least be serializable](https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)).
105105
106-
However, Redux Starter Kit rests on the assumption that you use string action types. Specifically, some of its features rely on the fact that with strings, the `toString()` method of an `createAction()` action creator returns the matching action type. This is not the case for non-string action types because `toString()` will return the string-converted type value rather than the type itself.
106+
However, Redux Toolkit rests on the assumption that you use string action types. Specifically, some of its features rely on the fact that with strings, the `toString()` method of an `createAction()` action creator returns the matching action type. This is not the case for non-string action types because `toString()` will return the string-converted type value rather than the type itself.
107107
108108
```js
109109
const INCREMENT = Symbol('increment')

docs/api/createSelector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ For more details on using `createSelector`, see:
1616
- [Idiomatic Redux: Using Reselect Selectors for Encapsulation and Performance](https://blog.isquaredsoftware.com/2017/12/idiomatic-redux-using-reselect-selectors/)
1717
- [React/Redux Links: Reducers and Selectors](https://github.com/markerikson/react-redux-links/blob/master/redux-reducers-selectors.md)
1818

19-
> **Note**: Prior to v0.7, RSK re-exported `createSelector` from [`selectorator`](https://github.com/planttheidea/selectorator), which
19+
> **Note**: Prior to v0.7, RTK re-exported `createSelector` from [`selectorator`](https://github.com/planttheidea/selectorator), which
2020
> allowed using string keypaths as input selectors. This was removed, as it ultimately did not provide enough benefits, and
2121
> the string keypaths made static typing for selectors difficult.

docs/api/createSlice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ for references in a larger codebase.
104104
## Examples
105105

106106
```js
107-
import { createSlice } from 'redux-starter-kit'
107+
import { createSlice } from '@reduxjs/toolkit'
108108
import { createStore, combineReducers } from 'redux'
109109
110110
const counter = createSlice({

docs/api/getDefaultMiddleware.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ const store = configureStore({
5151

5252
### Development
5353

54-
One of the goals of Redux Starter Kit is to provide opinionated defaults and prevent common mistakes. As part of that,
54+
One of the goals of Redux Toolkit is to provide opinionated defaults and prevent common mistakes. As part of that,
5555
`getDefaultMiddleware` includes some middleware that are added **in development builds of your app only** to
5656
provide runtime checks for two common issues:
5757

5858
- [`redux-immutable-state-invariant`](https://github.com/leoasis/redux-immutable-state-invariant): deeply compares
5959
state values for mutations. It can detect mutations in reducers during a dispatch, and also mutations that occur between
6060
dispatches (such as in a component or a selector). When a mutation is detect, it will throw an error and indicate the key
6161
path for where the mutated value was detected in the state tree.
62-
- `serializable-state-invariant-middleware`: a custom middleware created specifically for use in Redux Starter Kit. Similar in
62+
- `serializable-state-invariant-middleware`: a custom middleware created specifically for use in Redux Toolkit. Similar in
6363
concept to `redux-immutable-state-invariant`, but deeply checks your state tree and your actions for non-serializable values
6464
such as functions, Promises, Symbols, and other non-plain-JS-data values. When a non-serializable value is detected, a
6565
console error will be printed with the key path for where the non-serializable value was detected.

docs/api/otherExports.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ hide_title: true
77

88
# Other Exports
99

10-
Redux Starter Kit exports some of its internal utilities, and re-exports additional functions from other dependencies as well.
10+
Redux Toolkit exports some of its internal utilities, and re-exports additional functions from other dependencies as well.
1111

1212
## Internal Exports
1313

@@ -25,7 +25,7 @@ import {
2525
configureStore,
2626
createSerializableStateInvariantMiddleware,
2727
isPlain
28-
} from 'redux-starter-kit'
28+
} from '@reduxjs/toolkit'
2929

3030
// Augment middleware to consider Immutable.JS iterables serializable
3131
const isSerializable = value => Iterable.isIterable(value) || isPlain(value)

docs/introduction/quick-start.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hide_title: true
99

1010
## Purpose
1111

12-
The **Redux Starter Kit** package is intended to help address three common concerns about Redux:
12+
The **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:
1313

1414
- "Configuring a Redux store is too complicated"
1515
- "I have to add a lot of packages to get Redux to do anything useful"
@@ -20,12 +20,12 @@ We can't solve every use case, but in the spirit of [`create-react-app`](https:/
2020
This package is _not_ intended to solve every possible concern about Redux, and is deliberately limited in scope. It does _not_ address concepts like "reusable encapsulated Redux modules", data fetching, folder or file structures, managing entity relationships in the store, and so on.
2121

2222
That said, **these tools should be beneficial to all Redux users**. Whether you're a brand new Redux user setting up your
23-
first project, or an experienced user who wants to simplify an existing application, **Redux Starter Kit** can help
23+
first project, or an experienced user who wants to simplify an existing application, **Redux Toolkit** can help
2424
you make your Redux code better.
2525

2626
## What's Included
2727

28-
Redux Starter Kit includes:
28+
Redux Toolkit includes:
2929

3030
- A [`configureStore()` function](../api/configureStore.md) with simplified configuration options. It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes `redux-thunk` by default, and enables use of the Redux DevTools Extension.
3131
- A [`createReducer()` utility](../api/createReducer.md) that 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`.
@@ -35,14 +35,18 @@ Redux Starter Kit includes:
3535

3636
## Installation
3737

38-
Redux Starter Kit is available as a package on NPM for use with a module bundler or in a Node application:
38+
Redux Toolkit is available as a package on NPM for use with a module bundler or in a Node application:
3939

4040
```bash
41-
npm install --save redux-starter-kit
41+
# NPM
42+
npm install --save @reduxjs/toolkit
43+
44+
# Yarn
45+
yarn add @reduxjs/toolkit
4246
```
4347

44-
It is also available as a precompiled UMD package that defines a `window['redux-starter-kit']` global variable.
45-
The UMD package can be used as a [`<script>` tag](https://unpkg.com/redux-starter-kit/dist/redux-starter-kit.umd.js) directly.
48+
It is also available as a precompiled UMD package that defines a `window.RTK` global variable.
49+
The UMD package can be used as a [`<script>` tag](https://unpkg.com/@reduxjs/toolkit/dist/redux-toolkit.umd.js) directly.
4650

4751
## Help and Discussion
4852

0 commit comments

Comments
 (0)