CSFrequency / react-firebase-hooks

React Hooks for Firebase.
Apache License 2.0
3.58k stars 305 forks source link

Allow an initial value to be returned by the data hooks #191

Closed dylanwatsonsoftware closed 2 years ago

dylanwatsonsoftware commented 2 years ago

Resolves #190

As discussed, here is a PR to allow an initial value to be specified.

Questions that probably should be discussed:

I also added a github action as I find them useful.. happy to remove if its not. Its run doesn't seem to show up in this PR but you can find it here: https://github.com/dylanwatsonsoftware/react-firebase-hooks/runs/4581537894?check_suite_focus=true

Merging this into the v3.0.x branch as this is the one that I'm forced to use due to a bug in firebase v9.

dylanwatsonsoftware commented 2 years ago

No dramas. I've had a go at adding something to the README. How's that?

chrisbianca commented 2 years ago

Thanks @dylanwatsonsoftware, this looks great. I'll get a release out shortly

chrisbianca commented 2 years ago

Release here: https://github.com/CSFrequency/react-firebase-hooks/releases/tag/v3.0.5

dylanwatsonsoftware commented 2 years ago

Wow that was fast! Thanks so much!

mauriceackel commented 1 year ago

Hi @chrisbianca I just wanted to use this feature in the current release (5.0.3) and was surprised to see that it is not part of this branch. Was there a reason for not having this as part of version 5? I have not seen any infos about this breaking change in the release notes.

I would love to see this feature in v5, so could we cherry pick those changes to the master branch?

Thanks, Maurice