* Using our subject/cache to fix the init race I introduced with the refactor
* Naming
* Await init on non-contextual app, if one is passed
* void | Promise<any> better describes the contract
* Global cache and test
* Drop `initPerformance` (closes#207)
* Cleaning up the use/preload types
* Use my good friend `Proxy` to allow access to both the `serviceProps` and the initialized instance without double calling (e.g, `useAuth()()`)
* More checks against double initializing
* Added binding to the initialize call (closes#213)
* `SuspenseWithPerf` now lazy loads performance monitoring and uses the user timing API
* Fixed the CJS build with a better external test (closes#214)
Refactoring `useObservable` and `preloadObservable` to be more suspense friendly.
The core idea here is that our "observable" should expose a promise that resolves on first emission (which can be thrown for suspense), a synchronous means of getting the latest value (to pass into `useState`), and a shared subscription for use thereafter (for `useEffect`).
As a matter of optimization they will keep their cache around for only a present amount of time (30 seconds by default) unless they are subscribed to (`useEffect`); in which case the cache will remain until the component is unloaded. This should be enough time to prevent suspense from thrashing.
To encapsulate this behavior this we've implemented our own `Subject`.
Other changes in this PR:
* Ensure that the observable cache has to be keyed very specifically taking into account the firebase app, options, etc.
* Make sure no cache keys overlap on tests & different exports
* We're using more typescript in the tests, build them as part of the main build step since jest wasn't playing nice
* There's still some meh types kicking around here, should take as an AI
* Errors are thrown again until the cache timeout elapses, put down a TODO for now
* `FirebaseAppProvider` now throws if the provided config does not match the existing instance options, rather than simply returning the default
* `FirebaseAppProvider` now takes an `appName` property allowing you to have more than one app
* Move sample-simple to Concurrent Mode
* Preload a query and lazy import Firestore
* more work on async/preloading
* demonstrate useTransition
* Update docs
* add note about experimental react build
* Update rollup config
Now that we're doing lazy imports with multiple chunks,
rollup needs to output to a directory
* docs fixes
* lazy import the rest of the SDKs
* remove some extra imports
* remove some extra imports
* update return type for AuthCheck and SuspenseWithPerf to JSX.Element
* remove changes to yarn.lock
* wrap AuthCheck fallback and children in React Fragment
* fix brackets
* make sample-simple depend on local reactfire instead of published version
* add a Prettier formatter pre-commit hook
* run prettier on the whole project
* Clarify local development instructions