-
-
Notifications
You must be signed in to change notification settings - Fork 553
Extract firebase helpers initialization #150
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
Conversation
Codecov Report
@@ Coverage Diff @@
## v1.5.0 #150 +/- ##
=========================================
Coverage ? 86.32%
=========================================
Files ? 18
Lines ? 1485
Branches ? 244
=========================================
Hits ? 1282
Misses ? 203
Partials ? 0 |
|
Nice work! I have been wanting to do this for a while now. Going to test it out. |
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.
Overall looks awesome, just some small changes
src/init.js
Outdated
| import { isObject } from 'lodash' | ||
| import { authActions, queryActions, storageActions } from './actions' | ||
|
|
||
| export default function init (firebase, config, dispatch) { |
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.
It would be nice to see this as a const set to a function instead of a named function to limit scope unless there is a reason it is being named:
export default (firebase, config, dispatch) => {| @@ -0,0 +1,346 @@ | |||
| import { isObject } from 'lodash' | |||
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.
It might help for clarity to call this file "createFirebaseInstance" or something along those lines.
|
I've applied your changes |
|
I believe the branch was made from master instead of v1.5.0. Going to make similar changes and attempt to resolve conflicts. |
|
Similar has been done and released in Hopefully will soon get time to try to get it into a |
Description
Extract initialization to separate module will allow to configure more than one firebase app and use externally loaded firebase (from firebase hosting, not from npm).
Also library will not dictate to use it's
compose, in my case I usecomposefrom redux dev tools.store configuration may look like this:
Questions
Check List
Relevant Issues