Enable direct ad-hoc imports
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- firebase, react, react-native, typescript
- Ambito
- developer-experience, frontend, mobile
Direzione di ricerca
Inizia riproducendo l'errore IDBIndex in una nuova app Expo usando le versioni indicate di React Native, Reactfire e Firebase, quindi esamina come Reactfire esporta i suoi provider. Il lavoro è completo quando gli utenti possono importare solo il componente necessario, ad esempio FirebaseAppProvider, senza caricare funzionalità non correlate né attivare l'errore.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Can't find variable: IDBIndex when setting up on Expo
I used the same hierarchy I had working on the web. I am not using performance or analytics, so I think all of the underlying components should work.
But, I believe that since there isn't a way (that I can tell) to import only specific components, I end up with an error as if I were importing performance package.
import React from 'react'
import { getAuth, connectAuthEmulator } from 'firebase/auth'
import { getFunctions, connectFunctionsEmulator } from "firebase/functions"
import { getStorage, connectStorageEmulator } from "firebase/storage"
import { getFirestore, connectFirestoreEmulator } from "firebase/firestore";
import { FirebaseAppProvider, useFirebaseApp, AuthProvider, StorageProvider, FirestoreProvider } from 'reactfire';
function FirebaseComponents({ children }) {
const app = useFirebaseApp() // a parent component contains a `FirebaseAppProvider`
const auth = getAuth(app)
const functions = getFunctions(app)
const firestoreInstance = getFirestore(app)
const storage = getStorage(app)
return (
<AuthProvider sdk={auth}>
<FirestoreProvider sdk={firestoreInstance}>
<StorageProvider sdk={storage}>
{children}
</StorageProvider>
</FirestoreProvider>
</AuthProvider>
);
}
function AllFirebaseComponents({ children, fire }) {
return (
<FirebaseAppProvider firebaseApp={fire} >
<FirebaseComponents>
{children}
</FirebaseComponents>
</FirebaseAppProvider>
)
}
export default AllFirebaseComponents
Version info
"react": "^17.0.2",
"react-native": "~0.63.4",
"reactfire": "^4.2.0",
"firebase": "^9.0.1",
Test case
TBU, will try to get one of these
Steps to reproduce
Start a new expo app, attempt to use reactfire. Get error mentioned above.
Expected behavior
Be able to import only the components needed, ex:
import FirebaseAppProvider from 'reactfire/FirebaseAppProvider';
Actual behavior
I get the error mentioned above which I think comes from the performance stuff
- Lingua principale
- TypeScript
- Stelle
- 3.6k
- Fork
- 403
- Merge medio
- 5g 1h
- PR unite (30g)
- 10
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di FirebaseExtended/reactfire
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
FirebaseExtended/reactfire#801 ·
-
v5
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
FirebaseExtended/reactfire#793 ·
-
v5
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
FirebaseExtended/reactfire#790 · 2 commenti ·
-
v5
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
FirebaseExtended/reactfire#789 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
FirebaseExtended/reactfire#788 ·
Tutte le issue di FirebaseExtended/reactfire
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
bcgov/bc-wallet-mobile#4761 · 1 commento ·
-
external-issue to-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
area-deployment area-integrations triage:bot-seen
Difficoltà 2/5 Mezza giornata Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100