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

Create a Generic useFirebase and **compose** it in more specific Custom Hooks likeuseWhateverData #80

Open
JacobMGEvans opened this issue Feb 6, 2021 · 2 comments
Labels
Difficulty: Beginner 🤓 Good for newbie to start Raiding!! Items: Uncommon Priority: Low 🍃 Nice to have, won't effect Raid completion or how fast members move through the dungeons! Type: Refactor 🍂 Code Changes - No Feature & No significant rewrite

Comments

@JacobMGEvans
Copy link
Member

JacobMGEvans commented Feb 6, 2021

https://usehooks.com/useFirestoreQuery/
useCollection is specific, I would rather there is a useFirebase and is composed in more specific Custom Hooks like useCollection, useCharacters, useWhateverFirebaseData, or whatever. Likely the general Firebase logic was put into useCollection due to when it was written it being the only Firebase Query

Originally posted by @JacobMGEvans in #78 (comment)

@JacobMGEvans JacobMGEvans added Difficulty: Beginner 🤓 Good for newbie to start Raiding!! Items: Uncommon Priority: Low 🍃 Nice to have, won't effect Raid completion or how fast members move through the dungeons! Type: Refactor 🍂 Code Changes - No Feature & No significant rewrite labels Feb 6, 2021
@JacobMGEvans JacobMGEvans changed the title Create a Generic useFirebase and **compose** it in more specific Custom Hooks likeuseWhateverFirebaseData Create a Generic useFirebase and **compose** it in more specific Custom Hooks likeuseWhateverData Feb 6, 2021
@nobrayner
Copy link
Contributor

Dropping this here as well

#78 (comment)

@AhmedEldessouki
Copy link
Contributor

https://github.com/AhmedEldessouki/portfolio/blob/main/src/Utils/apis.ts#L112-L123
shall we also make something like this? 🤔

nobrayner added a commit that referenced this issue Mar 26, 2021
@nobrayner nobrayner mentioned this issue Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Beginner 🤓 Good for newbie to start Raiding!! Items: Uncommon Priority: Low 🍃 Nice to have, won't effect Raid completion or how fast members move through the dungeons! Type: Refactor 🍂 Code Changes - No Feature & No significant rewrite
Projects
None yet
Development

No branches or pull requests

3 participants