Skip to content
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

Firebase 9 Support #153

Closed
wants to merge 5 commits into from
Closed

Firebase 9 Support #153

wants to merge 5 commits into from

Conversation

jdpt0
Copy link

@jdpt0 jdpt0 commented May 25, 2021

Adds support for Firebase 9.

Closes #105

Firestore and Database hooks are using the compat imports currently, as I'm not familiar with those APIs. In order to get the full tree-shaking improvements of Firebase 9, these compat imports will need to be updated.

@lcdss
Copy link

lcdss commented Jun 7, 2021

There is something that have to be done to get this PR merged?

@klutchdev
Copy link

I wanted to check up on this too!
Is there anything I can do to help get a useAuthState hook operational that will work with auth/onAuthStateChanged found in the new modular v9 auth SDK?

@klutchdev
Copy link

I forked this repo, updated dependencies, replaced 2 webpack packages, and refactored everything needed to support Firebase v9 beta. Obviously these changes will break anything NOT using v9 Beta, so a major update with all those breaking changes wouldn't be a slick move. But, I am more than happy to get something together so we could have a seperate release specifically for v9 that would be available in addition to the current RFH package which is awesome. So far I have all Auth features, storage features, and a couple Firestore features tested and running smooth without any errors or dependency issues. I'm here to help out if this something you all would deem useful!

@lcdss
Copy link

lcdss commented Jul 30, 2021

I forked this repo, updated dependencies, replaced 2 webpack packages, and refactored everything needed to support Firebase v9 beta. Obviously these changes will break anything NOT using v9 Beta, so a major update with all those breaking changes wouldn't be a slick move. But, I am more than happy to get something together so we could have a seperate release specifically for v9 that would be available in addition to the current RFH package which is awesome. So far I have all Auth features, storage features, and a couple Firestore features tested and running smooth without any errors or dependency issues. I'm here to help out if this something you all would deem useful!

Did you remove the compat to be complete modular? From firebase docs:

Compat libraries have little to no size or performance advantages over their version 8 counterparts.

@klutchdev
Copy link

klutchdev commented Jul 31, 2021

I did

** Also, Firebase did make it clear that we would be moving to 9, and once that happens v8 will become frozen- not sure when, but it'd be sweet to at least have it out on the table so anyone can use the library same as usual 😊

@matamatanot
Copy link
Contributor

Firebase V9 is released!
https://www.npmjs.com/package/firebase/v/9.0.0

Copy link
Contributor

@matamatanot matamatanot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v9 major version is released!

@@ -52,7 +52,7 @@
"dependencies": {},
"devDependencies": {
"@types/react": "^17.0.0",
"firebase": "^8.0.0",
"firebase": "9.0.0-beta.2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"firebase": "9.0.0-beta.2",
"firebase": "9.0.0",

@@ -67,7 +67,7 @@
},
"peerDependencies": {
"react": ">= 16.8.0",
"firebase": ">= 8.0.0"
"firebase": ">= 9.0.0-beta.2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"firebase": ">= 9.0.0-beta.2"
"firebase": ">= 9.0.0"

@leoortizz
Copy link

@chrisbianca is there any plans on merging this PR?

@K-Sato1995 K-Sato1995 mentioned this pull request Sep 9, 2021
@TheSwordBreaker
Copy link

TheSwordBreaker commented Sep 17, 2021

node_modules/react-firebase-hooks/auth/dist/auth/useAuthState.d.ts:3:58 - error TS2694: Namespace '"D:/KUNAL/User/React/superchat/node_modules/firebase/app/dist/app/index"' has no exported member 'User'.

3 export declare type AuthStateHook = LoadingHook<firebase.User | null, firebase.auth.Error>;

Can Anyone help me !!

@justdvl
Copy link

justdvl commented Sep 21, 2021

Seems I will have to remove react-firebase-hooks from my project :(

@theoilie
Copy link

Would love to see this get merged!

@Skia69
Copy link

Skia69 commented Sep 22, 2021

You guys might wanna check this one out https://github.com/FirebaseExtended/reactfire
It has been updated to v4 about a month ago which supports firebase v9

@melWiss
Copy link

melWiss commented Sep 25, 2021

aaaaaaaaaaaaanything new about merging this PR?

@fabienrohrer
Copy link

Please merge this PR 👍

@andipaetzold andipaetzold mentioned this pull request Sep 29, 2021
4 tasks
@andipaetzold
Copy link
Contributor

👋 All my projects are also stuck on firebase 8, and this PR doesn't do a full migration to firebase 9 but still uses the compatibility imports.

Therefore, I tried to do a full migration of the whole package and opened a separate PR converts all components and the documentation. That PR is temporarily deployed as react-firebase9-hooks to allow easy testing and migration of projects to the latest firebase version without depending on react-firebase-hook to release an update.

More details in the PR: #174

@Skia69
Copy link

Skia69 commented Sep 29, 2021

👋 All my projects are also stuck on firebase 8, and this PR doesn't do a full migration to firebase 9 but still uses the compatibility imports.

Therefore, I tried to do a full migration of the whole package and opened a separate PR converts all components and the documentation. That PR is temporarily deployed as react-firebase9-hooks to allow easy testing and migration of projects to the latest firebase version without depending on react-firebase-hook to release an update.

More details in the PR: #174

Not all heroes wear capes.

@theonlydaleking
Copy link

We should actually get him a cape tho

@jdpt0 jdpt0 closed this Sep 30, 2021
@jdpt0
Copy link
Author

jdpt0 commented Sep 30, 2021

Closed in favour of #174 which doesn't use compat imports. Nice job @andipaetzold

@jdpt0 jdpt0 deleted the firebase_9 branch October 29, 2021 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for firebase 9?