To run a query within a React component, call useAutocompleteSearchPlaceQuery and pass it any options that fit your needs.
When your component renders, useAutocompleteSearchPlaceQuery returns an object from Apollo Client that contains loading, error, and data properties
you can use to render your UI.
Example
const { data, loading, error } = useAutocompleteSearchPlaceQuery({ variables: { text:// value for 'text' source: // value for 'source' }, });
useAutocompleteSearchPlaceQuery
To run a query within a React component, call
useAutocompleteSearchPlaceQuery
and pass it any options that fit your needs. When your component renders,useAutocompleteSearchPlaceQuery
returns an object from Apollo Client that contains loading, error, and data properties you can use to render your UI.Example