Support multiple apps
Currently, the reduxReactFirebase call is very opinionated on how to use firebase, it attaches itself to the store as firebase and, in addition, also attaches itself to the global firebase module. That is bad style, and makes it entirely monolithic.
As explained in the official documentation, you can work against the database of a specific app by simply storing the reference to the object from the return value of the initializeApp call, and then call database() on that, instead of calling it directly on the default firebase object.
I didn't understand what you suggest. This lib is attached to firebase.database on the initialization and also give you access to the rest options by giving you the original firebase object.
If you want to do hacks of seperate the same app to multiple projects for not paying its not something that we need to support. Its breaks the idea of one project for one app/environment. I don't familiar wirh situation that you need multiple projects on the same time for regular using.
Multi-project apps is a basic feature supported and advertised by firebase officially. This is neither hacking nor illegal nor is it unwelcome. For many of its products, Google tends to offer limitations per account, however the number of accounts is unlimited. That applies to Firebase, just like it does to Gmail and Drive. If they didn't want people to use multiple accounts, they would not make it such a core feature and they would limit accounts/apps/projects/whathaveyou per user. I myself am not even likely to exceed the limits of a single app's free plan with my prototype anytime soon, so I am not too worried. But in my front-end-only applications, I generally would like to be able to work against multiple back-ends at the same time.
Re my proposal: I was thinking along the lines of offering an additional parameter to determine the app, like so:
@firebase({
app1: [
'todos'
],
app2: [
'otherstuff'
]
})
and in render() you can do:
const { app1, app2, todos, otherstuff } = this.props;
This approach to global state management might not be the cleanest but it could work just fine for smaller apps. How to deal with complex "services" (such as firebase) in Redux is an open question, and is also discussed here and I opened a more specific discussion here (as well as other places).
However, if, as you say, there is some rationale that says that you only want an app to ever work against a single back-end, then that's of course unnecessary for your project, and you can safely ignore this issue :)
Now after i saw the officially docs I understand you. Its not a common usage but it's something that can be too. It would be great if you can submit a PR for that.
I'll see where I can find the time :D