FirebaseExtended / FirebaseExtended/reactfire
Enable direct ad-hoc imports
- Ngôn ngữ chính
- TypeScript
- Star
- 3.6k
- Fork
- 403
- Merge trung bình
- 14 giờ 53 phút
- Pull request đã merge (30 ngày)
- 5
Mô tả
`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 (
{children}
);
}
function AllFirebaseComponents({ children, fire }) {
return (
{children}
)
}
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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi IDBIndex trong một ứng dụng Expo mới bằng cách sử dụng các phiên bản React Native, Reactfire và Firebase được liệt kê, sau đó kiểm tra cách Reactfire export các provider của mình. Công việc được xem là hoàn tất khi người dùng có thể chỉ import component cần thiết, chẳng hạn như FirebaseAppProvider, mà không tải các chức năng không liên quan hoặc kích hoạt lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- firebase, react, react-native, typescript
- Lĩnh vực
- developer-experience, frontend, mobile
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100