Enable direct ad-hoc imports
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- firebase, react, react-native, typescript
- Lĩnh vực
- developer-experience, frontend, mobile
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.
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 (
<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
- Ngôn ngữ chính
- TypeScript
- Star
- 3.6k
- Fork
- 403
- Merge trung bình
- 5 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 10
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của FirebaseExtended/reactfire
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
FirebaseExtended/reactfire#801 ·
-
v5
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
FirebaseExtended/reactfire#793 ·
-
v5
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
FirebaseExtended/reactfire#790 · 2 bình luận ·
-
v5
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
FirebaseExtended/reactfire#789 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
FirebaseExtended/reactfire#788 ·
Tất cả issue của FirebaseExtended/reactfire
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
bcgov/bc-wallet-mobile#4761 · 1 bình luận ·
-
external-issue to-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
area-deployment area-integrations triage:bot-seen
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100