Installation
npm install --save @types/react-broadcast
Summary
This package contains type definitions for react-broadcast (https://github.com/ReactTraining/react-broadcast).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-broadcast.
index.d.ts
import * as React from "react";
export namespace Subscriber {
interface DefaultProps {
quiet: boolean;
}
interface Props<T> extends Partial<DefaultProps> {
channel: string;
children?: ((state: T) => React.ReactNode) | undefined;
}
}
export namespace Broadcast {
interface DefaultProps<T> {
compareValues: (prevValue: T, nextValue: T) => boolean;
}
interface Props<T> extends Partial<DefaultProps<T>> {
channel: string;
children: React.ReactNode;
value: T;
}
}
export class Broadcast<T> extends React.Component<Broadcast.Props<T>, any> {}
export class Subscriber<T> extends React.Component<Subscriber.Props<T>, any> {}
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/react
Credits
These definitions were written by Jaga Santagostino.