-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans to integrate with firebase v9? #109
Comments
I threw this together and it may be a start. I was able to connect to v9! import { initializeApp, getApp } from 'firebase/app';
import { getAuth } from 'firebase/auth';
import { getFirestore } from 'firebase/firestore';
import { getFunctions } from 'firebase/functions';
import { getStorage } from 'firebase/storage';
const firebaseConfig = {
// your fb config, apiKey: "123..."
};
export const fbConfig = initializeApp(firebaseConfig);
type Config = typeof fbConfig;
const auth = getAuth(getApp());
const db = getFirestore(getApp());
const functions = getFunctions(getApp());
const storage = getStorage(getApp());
export class Fuego {
public db: typeof db;
public auth: typeof auth;
public functions: typeof functions;
public storage: typeof storage;
constructor(config: Config) {
this.db = !fbConfig ? db : db; // this is probably pointless
this.auth = auth;
this.functions = functions;
this.storage = storage;
}
} Unfortunately, there are more modifications to be made on the hooks files (see errors below) since everything has changed from v8 -> v9 - I'll try to dig around on this My current project is using vite + preact + typescript - I wrote my own hooks for v9 recently - just straight FB, but I was using Fuego before on another project and I really want to see it continue. |
@lemasc I looked through your repo. I don't have time to test at the moment, but at first glance, it all looks good! Congrats on your first contribution - I know it can be intimidating. If someone else wants to look at / test that, feel free. You can also direct attention to it on my "Help Wanted" issue. See: #117 |
@nandorojo Thanks! I think I will create a PR so that it might be easier to track any changes. |
The current firebase sdk has a large bundle size. The upcoming v9 version seems to solve this problem. I have tried implementing it with swr-firestore, but there are too many changes.
Firebase Modular
The text was updated successfully, but these errors were encountered: