ionic-team / ionic-team/ionic-storage

The new `storage.create()` method has ambiguous behavior / documentation

Aperta
#224 12 commenti 7 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
456
Fork
97
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

In the new `@ionic/storage` API, particularly when using the `storage-angular` module, the behavior of the `storage.create()` method is unclear.

It appears in some parts of the documentation that this method could/should be used to create a new instance of `Storage` that is held and maintained by a central Angular service. Yet in other parts of the documentation, it appears it is enough just to inject the Provider `Storage` into components & services.

The `create()` method needs to be called at least once even is using the direct injection approach, and it's not clear what happens if `create()` is called multiple times. Particularly if the service is injected vs. not injected, etc.

It would be great if the docs could be clarified so that we know when to call `create()` or not. Does it only need to be called once per application, or once every place `Storage` is injected? And what are the consequences of calling it multiple times, even if the return value is ignored?

Thanks!

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Esamina la documentazione di @ionic/storage e storage-angular insieme all’utilizzo di create() descritto nell’issue. Chiarisci quando create() è necessario, se è applicabile a tutta l’applicazione o è specifico dell’iniezione e cosa fanno le chiamate ripetute; la documentazione è completa quando questi casi e le loro conseguenze sono indicati in modo coerente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.