1.2.1 • Published 1 year ago
refine-firebase v1.2.1
Refine-Firebase
Firebase integration tool for your Refine app
Install
npm i refine-firebase
Usage
1. Create a config file and initialize firebase.
firebaseConfig.js
import { initializeFirebase } from "refine-firebase";
export const firebaseConfig = {
apiKey: XXXXX,
authDomain: XXXXX,
projectId: XXXXX,
storageBucket: XXXXX,
messagingSenderId: XXXXX,
appId: XXXXX,
databaseURL: XXXXX,
};
export const firebaseApp = initializeFirebase(firebaseConfig);
2. Create tools according to your needs.
firebaseConfig.js
import {
FirebaseAuth,
FirebaseDatabase,
FirestoreDatabase,
} from "refine-firebase";
export const firebaseAuth = new FirebaseAuth();
export const firestoreDatabase = new FirestoreDatabase();
export const firebaseDatabase = new FirebaseDatabase();
3. Use dataProviders for Refine
App.js
import {firebaseAuth, firestoreDatabase }from "./firebaseConfig";
<Refine
dataProvider={firestoreDatabase.getDataProvider()}
authProvider={firebaseAuth.getAuthProvider()}
>
API Reference
Functions
Function | Description |
---|---|
initializeFirebase | Creates and initializes a FirebaseApp instance. |
Classes
Class | Description |
---|---|
FirebaseAuth | Provider for generating firebase-authentication and IAuthContext for @pankod/refine auth-provider |
FirestoreDatabase | Provider for initializing Firestore instance with the provided FirebaseApp and creating @pankod/refine dataProvider |
FirebaseDatabase | Provider for initializing Realtime-Database instance with the provided FirebaseApp and creating @pankod/refine dataProvider |
License
1.2.1
1 year ago
1.2.0
1 year ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.28
3 years ago
1.0.27
3 years ago
1.0.26
3 years ago
1.0.25
3 years ago
1.0.24
3 years ago
1.0.23
3 years ago
1.0.22
3 years ago
1.0.21
3 years ago
1.0.20
3 years ago
1.0.19
3 years ago
1.0.18
3 years ago
1.0.17
3 years ago
1.0.16
3 years ago
1.0.15
3 years ago
1.0.14
3 years ago
1.0.13
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago