website icon indicating copy to clipboard operation
website copied to clipboard

Create a Generic `useFirebase` and **compose** it in more specific Custom Hooks like`useWhateverData`

Open JacobMGEvans opened this issue 4 years ago • 2 comments

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 https://github.com/OpenSourceRaidGuild/website/pull/78#discussion_r571496289

JacobMGEvans avatar Feb 06 '21 22:02 JacobMGEvans

Dropping this here as well

https://github.com/OpenSourceRaidGuild/website/pull/78#discussion_r571499639

nobrayner avatar Feb 06 '21 22:02 nobrayner

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

AhmedEldessouki avatar Feb 14 '21 09:02 AhmedEldessouki