UNPKG

@shopify/react-html

Version:

A component to render your react app with no static HTML.

15 lines (14 loc) 733 B
import React from 'react'; export declare const EXTRACT_ID: unique symbol; interface SerializeProps<T> { data: () => T | Promise<T>; } interface WithSerializedProps<T> { children(data?: T): React.ReactElement<any>; } export declare function useSerialized<T>(id: string): [T | undefined, React.ComponentType<SerializeProps<T>>]; export declare function createSerializer<T>(id: string): { Serialize: ({ data }: SerializeProps<T>) => null; WithSerialized: ({ children }: WithSerializedProps<T>) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>; }; export {};