I have a react app that loads multiple components on the page. Each component is authenticated before it is rendered.
https://github.com/amjith/simple-react-app
The authentication is done via Firebase using a decorator that I wrote:
https://github.com/amjith/simple-react-app/blob/master/login-decorator.js
It is used as follows:
https://github.com/amjith/simple-react-app/blob/master/small-component.js#L4
But when I load the page only one of the component renders and the other component says it is still loading. The promise that was returned by firebase.authWithCustomToken()
never resolves for the component that is unrendered.
If firebase api sdk is doing some caching then it should at least honor all the callbacks and resolve the promises.
I wonder why this isn't working.