Membrane React - v0.29.2
    Preparing search index...

    Function useScreen

    • Parameters

      • selector:
            | string
            | {
                id?: string;
                type?: Integration;
                key?: string;
                autoCreate?: boolean;
                connectionId?: string;
            }

      Returns {
          accessor: ScreenAccessor | undefined;
          loading: boolean;
          saving: boolean;
          error: any;
          refresh: () => Promise<
              {
                  id: string;
                  name: string;
                  type: Integration;
                  key?: string;
                  blocks: ({ type: ScreenBlockType } & Record<string, any>)[];
              },
          >;
          refreshing: boolean;
          create: (
              data: {
                  name?: string;
                  meta?: Record<string, any>;
                  blocks?: ({ type: ScreenBlockType } & Record<string, any>)[];
                  key?: string;
                  type: Integration;
              },
          ) => Promise<
              | {
                  id: string;
                  name: string;
                  type: Integration;
                  key?: string;
                  blocks: ({ type: ScreenBlockType } & Record<string, any>)[];
              }
              | undefined,
          >;
          patch: (
              data: Partial<UpdateRequest>,
              options?: MutatorConfig,
          ) => Promise<void>;
          put: (
              data: {
                  name?: string;
                  meta?: Record<string, any>;
                  blocks?: ({ type: ScreenBlockType } & Record<string, any>)[];
                  key?: string;
              },
              options?: MutatorConfig,
          ) => Promise<void>;
          archive: () => Promise<void>;
          screen:
              | {
                  id: string;
                  name: string;
                  type: Integration;
                  key?: string;
                  blocks: ({ type: ScreenBlockType } & Record<string, any>)[];
              }
              | undefined;
      }