IGPAPI
    Preparing search index...

    Function defineFeedScreen

    • Declares a feed screen: a screen whose data is one page of a feed and whose items are that page's entries. page declares the items like any item list — { at, key, item } or { at, key, by, variants } — over one page's answer; the handle shows the first page's items as page.

      • start, defaults, request, cursor and response are where the pages come from (ScreenFeedSource), flat on the declaration: the first page's cursor from the input, the feed's defaults, request and cursor (of a defineFeed config, one by one, never the config whole), the answer's schema.
      • enter({ input, navigate, page }) is the burst: page requests the first page, exactly once (else ScreenFeedPageError); its answer is the data.
      • The state is only the cursor of the next page (ScreenFeedState).
      • nextPage() — on the handle and on every page — requests the following page with the cursor of the page it is asked of, shows its items (their enters run, one after another, under the screen's frame) and returns the page with its own item handles; nothing accumulates — neither on the handle nor in the screen's frame — and a page's own JSON is never the state. On the last page it is ScreenFeedEndError. It is a transition: the screen must be on top and holds the top while the page loads.
      • leave and resume are the screen's visits, as for any screen. A feed's items have no visits (no recording shows one): theirs never run.

      A trail stores an item of a later page by its list, key and page number; a retrace requests the pages up to it again, fresh.

      Type Parameters

      • const Id extends
            | "FeedTimeline"
            | "ShortUrlFeed"
            | "ClipsViewer"
            | "CommentsV2"
            | "Explore"
            | "SearchTypeahead"
            | "SerpTop"
            | "SerpUsers"
            | "UserDetail"
            | "ProfileMediaTab"
            | "ContextualFeed"
            | "DirectInbox"
            | "DirectThread"
            | "CustomizeChat"
            | "DirectThreadThemePicker"
            | "DirectThreadDetails"
            | "DirectThreadSharedMedia"
            | "DirectThreadNicknames"
            | "DirectThreadNicknameChange"
            | "DirectThreadCustomGroupNameAndImage"
      • const Kind extends EnterableScreenKind
      • Input
      • Cursor
      • Data extends object
      • FE
      • FR
      • E
      • R
      • Actions extends Readonly<Record<string, ScreenMember<never>>>
      • const Page
      • RL = never

      Parameters

      Returns ScreenDefinition<
          Id,
          Kind,
          Input,
          Data,
          ScreenFeedState<Cursor>,
          FE | E | ScreenFeedPageError,
          FR | R | RL,
          Actions & ScreenFeedMembers<Cursor, Data, Page, FE, FR>,
          { page: Page },
      >