React SDK

useAutocomplete

useAutocomplete provides result and method for the autocomplete pipeline.

Usage

Editable Example
Suggestions
    Powered by

    Autocomplete

    Editable Example
    Suggestions
      Powered by

      Anatomy

      useAutocomplete returns an object containing the following properties:

      NameTypeDefaultDescription
      suggestionsstring[]An array of suggestions for the query.
      completionstringA string that is predicted by the pipeline base on the current query.
      search(q?: string) => voidFunction used to search for suggestions.

      Parameters

      NameTypeDefaultDescription