Interroge NerdStorage pour les données de portée utilisateur.
Récupérer une collection entière ou un seul document.
Usage
import { UserStorageQuery } from 'nr1';Exemples
Collection de requêtes
<UserStorageQuery collection="foo">  {({ loading, error, data }) => {    if (loading) {      return <Spinner />;    }
    if (error) {      return 'Error!';    }
    return <pre>{JSON.stringify(data, null, 4)}</pre>;  }}</UserStorageQuery>;Document de requête
<UserStorageQuery collection="foo" documentId="bar">  {({ loading, error, data }) => {    if (loading) {      return <Spinner />;    }
    if (error) {      return 'Error!';    }
    return <pre>{JSON.stringify(data, null, 4)}</pre>;  }}</UserStorageQuery>;Requête impérative
UserStorageQuery.query({  collection: 'myCollection',  documentId: 'myDocumentId',}).then(({ data }) => console.log(data));Accessoires
 fonction | Rendre la fonction prop comme un enfant. function ( | 
 OBLIGATOIREchaîne | Nom de la collection.  | 
 chaîne | Document identifiant pour opérer. En cas d'omission, la collection entière est renvoyée.  | 
 énum. | Vous permet de spécifier comment vous souhaitez que votre requête interagisse avec les données mises en cache. 
  | 
 nombre | Intervalle en millisecondes pour interroger de nouvelles données. Réglez à zéro pour éviter tout type d'interrogation régulière.  | 
 booléen | Lorsqu'il est défini sur   | 
Méthodes
UserStorageQuery.query
function (props: Object An object containing the query options. Any UserStorageQuery prop is a valid option except children and pollInterval.
) => PromiseQueryResultDéfinitions de types
PromiseQueryResult
{error: ApolloClient.ApolloError, Runtime error with graphQLErrors and networkError properties.
data: Object, Object containing the result of your query.
fetchMore: function|null, If not null, fetchMore allows you to load more results for your query. New data is merged with previous data.
refetch: function, Refetch the query.
}QueryResult
{loading: boolean, Indicates that the request is in flight.
error: ApolloClient.ApolloError, Runtime error with graphQLErrors and networkError properties.
data: Object, Object containing the result of your query.
fetchMore: function|null, If not null, fetchMore allows you to load more results for your query. New data is merged with previous data.
refetch: function, Refetch the query.
}