Skip to content

Commit 3ed8ce1

Browse files
christopherthielenmergify[bot]
authored andcommitted
fix: Restore UIRouterConsumer and UIViewConsumer context consumer components.
1 parent b5a2e80 commit 3ed8ce1

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/components/UIRouter.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import { ReactStateDeclaration } from '../interface';
2020
* ```
2121
*/
2222
export const UIRouterContext = React.createContext<UIRouterReact>(undefined);
23+
/** @deprecated use [[useRouter]] or React.useContext(UIRouterContext) */
24+
export const UIRouterConsumer = UIRouterContext.Consumer;
2325

2426
export interface UIRouterProps {
2527
plugins?: Array<PluginFactory<UIRouterPlugin>>;

src/components/UIView.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ export const TransitionPropCollisionError =
9595

9696
/** @internalapi */
9797
export const UIViewContext = createContext<UIViewAddress>(undefined);
98+
/** @deprecated use [[useParentView]] or React.useContext(UIViewContext) */
99+
export const UIViewConsumer = UIViewContext.Consumer;
98100

99101
/** @hidden */
100102
function useResolvesWithStringTokens(resolveContext: ResolveContext, injector: UIInjector) {

0 commit comments

Comments
 (0)