-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
feat(hooks): hook rework to match existing HOC #734
feat(hooks): hook rework to match existing HOC #734
Conversation
Codecov Report
@@ Coverage Diff @@
## v3.0.0-alpha.15 #734 +/- ##
===================================================
+ Coverage 82.86% 86.64% +3.77%
===================================================
Files 30 30
Lines 969 936 -33
Branches 177 175 -2
===================================================
+ Hits 803 811 +8
+ Misses 166 125 -41 |
A number of folks use a list of queries being passed to Awesome to see all the work on this! |
It isn't necessary. I just didn't know how to compare previous props inside const Comp1 = firebaseConnect(['test1', 'test2'])(() => <div />) is same as const Comp2 = () => {
useFirebaseConnect(['test1', 'test2'])
return <div />
} Another reason is 80% of time I use only single query inside HOC before, even sometimes I forgot to return a query as an array so it was a bit inconvenience for me. |
Hold on a bit. I misread react-redux changelogs that they included deps argument on Quoted from reduxjs/react-redux#1272 (comment)
|
Let me know when it is ready for review, but no rush 😄 . Thanks again for all of the great work! 💯 |
Yes, it's ready now. I had verified with example projects in this repo. But somehow firestore and material example is broken with unrelated issues so I had to fixed them to work. I think it worth another PR though. |
Nice work! Started reviewing this and everything is looking great so far 👏 I was thinking that it may be good to keep |
@@ -58,6 +58,12 @@ | |||
"redux-react-firebase" | |||
], | |||
"dependencies": { | |||
"gitbook-plugin-anchorjs": "^2.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove all of the gitbook dependencies - for some reason their cli automatically installs them
…preserve - #734 * fix(core): revert peer dependecy to 16.3.0 ([new context api](https://github.com/facebook/react/blob/master/CHANGELOG.md#1630-march-29-2018)) since only hooks require 16.8.0
* feat(hooks): hook rework to match existing HOC - #734 - @illuminist * fix(hooks): remove create functions (`createUseFirestore`, `createWithFirestore`, `createUseFirebase`, `createWithFirebase`) since store selection is not necessary * feat(auth): add custom claims - #741 - @joerex * fix(types): changed extended firebase instance to function - #743 - @rscotten * fix(types): switch `typeof Firebase` to `any` (prevents issue with passing some version of Firebase JS SDK) * fix(examples): update material and typescript examples
Description
List of changes:
useFirebaseConnect
anduseFirestoreConnect
is now reworked to be the same asfirebaseConnect
andfirestoreConnect
HOC respectively which mean full backward compatible even with exactly same query being use.firebaseConnect
andfirestoreConnect
is now internally useuseFirebaseConnect
anduseFirestoreConnect
with full backward compatible and no breaking change(as I can think of).Check List
If not relevant to pull request, check off as complete
Relevant Issues