Skip to content

Add Firestore ReactNative build #3198

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

Merged
merged 3 commits into from
Jun 11, 2020
Merged

Add Firestore ReactNative build #3198

merged 3 commits into from
Jun 11, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

@schmidt-sebastian schmidt-sebastian commented Jun 10, 2020

This builds work out of the box in RN since it relies on js-base64 for base64 encoding.

Fixes #2667

This builds work out of the box in RN since it relies on js-base64 for base64 encoding.
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 10, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (1e3721c) Head (b4d2ab4) Diff
    react-native ? 195 kB ? (?)
  • @firebase/firestore/memory

    Type Base (1e3721c) Head (b4d2ab4) Diff
    main 370 kB 370 kB +7 B (+0.0%)
    react-native ? 149 kB ? (?)

Test Logs

export function registerFirestore(instance: FirebaseNamespace): void {
configureForFirebase(
instance,
(app, auth) => new Firestore(app, auth, new IndexedDbComponentProvider())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RN doesn't support indexeddb, so we should use MemoryComponentProvider here. Probably just remove this file, and point react-native in the root package.json to the memory build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have some users that are using our IndexedDb Shim support. I am not sure if we should break them in this PR. FWIW, our main Node build also ships with IndexedDb support.

@schmidt-sebastian schmidt-sebastian merged commit 731a695 into master Jun 11, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/react branch July 9, 2020 17:44
@firebase firebase locked and limited conversation to collaborators Jul 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7.9.1 prevent the use of firestore in React Native
3 participants