Skip to content

Commit fb97665

Browse files
committed
Update remaining Context references to match the new nullable context
1 parent fd52689 commit fb97665

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/rtk-query/usage/customizing-create-api.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import {
3535
reactHooksModule,
3636
} from '@reduxjs/toolkit/query/react'
3737

38-
const MyContext = React.createContext<ReactReduxContextValue>(null as any)
38+
const MyContext = React.createContext<ReactReduxContextValue | null>(null)
3939
const customCreateApi = buildCreateApi(
4040
coreModule(),
4141
reactHooksModule({

packages/toolkit/etc/rtk-query-react.api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function ApiProvider<A extends Api<any, {}, any, any>>(props: {
7272
children: any
7373
api: A
7474
setupListeners?: Parameters<typeof setupListeners>[1]
75-
context?: Context<ReactReduxContextValue>
75+
context?: Context<ReactReduxContextValue | null>
7676
}): JSX.Element
7777

7878
// @public (undocumented)

packages/toolkit/src/query/createApi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export type CreateApi<Modules extends ModuleName> = {
233233
*
234234
* @example
235235
* ```ts
236-
* const MyContext = React.createContext<ReactReduxContextValue>(null as any);
236+
* const MyContext = React.createContext<ReactReduxContextValue | null>(null);
237237
* const customCreateApi = buildCreateApi(
238238
* coreModule(),
239239
* reactHooksModule({

packages/toolkit/src/query/react/module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export interface ReactHooksModuleOptions {
124124
*
125125
* @example
126126
* ```ts
127-
* const MyContext = React.createContext<ReactReduxContextValue>(null as any);
127+
* const MyContext = React.createContext<ReactReduxContextValue | null>(null);
128128
* const customCreateApi = buildCreateApi(
129129
* coreModule(),
130130
* reactHooksModule({

0 commit comments

Comments
 (0)