Skip to content

Commit

Permalink
chore(experimental): add support for passing experimental features (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hgray-instawork authored Feb 26, 2025
1 parent 67183b6 commit 99f2b11
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/contexts/navigation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {
ExperimentalFeatures,
Fetch,
HvBehavior,
HvComponent,
Expand Down Expand Up @@ -29,6 +30,7 @@ export type NavigationContextProps = {
loadingScreen?: ComponentType<LoadingProps>;
handleBack?: ComponentType<{ children: ReactNode }>;
navigationComponents?: NavigationComponents;
experimentalFeatures?: ExperimentalFeatures;
};

/**
Expand Down
1 change: 1 addition & 0 deletions src/core/components/hv-root/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ export default class Hyperview extends PureComponent<Types.Props> {
elementErrorComponent: this.props.elementErrorComponent,
entrypointUrl: this.props.entrypointUrl,
errorScreen: this.props.errorScreen,
experimentalFeatures: this.props.experimentalFeatures,
fetch: this.props.fetch,
handleBack: this.props.handleBack,
loadingScreen: this.props.loadingScreen,
Expand Down
2 changes: 2 additions & 0 deletions src/core/components/hv-root/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as Logging from 'hyperview/src/services/logging';
import { ComponentType, ReactNode } from 'react';
import type {
ExperimentalFeatures,
Fetch,
HvBehavior,
HvComponent,
Expand Down Expand Up @@ -35,4 +36,5 @@ export type Props = {
loadingScreen?: ComponentType<LoadingProps>;
handleBack?: ComponentType<{ children: ReactNode }>;
logger?: Logging.Logger;
experimentalFeatures?: ExperimentalFeatures;
};
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,3 +438,5 @@ export type Reload = (
optHref: DOMString | null | undefined,
opts: HvComponentOptions,
) => void;

export type ExperimentalFeatures = Record<string, never>;

0 comments on commit 99f2b11

Please sign in to comment.