-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(firestore): add support for onSnapshotsInSync #8379
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
Open
SelaseKay
wants to merge
50
commits into
main
Choose a base branch
from
feat-add-onSnapshotsInSync-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
c22d0ce
chore(firestore): add support for onSnapshotsInSync
SelaseKay 68c1770
fix: formatting
MichaelVerdon 0029fde
fix: formatting
MichaelVerdon 87af997
fix: formatting
MichaelVerdon 3238254
feat: add other impl
MichaelVerdon efc3a83
feat: add test files
MichaelVerdon 748393b
feat: add test
MichaelVerdon b398fa0
feat: started native code
MichaelVerdon 5d620ea
feat: started working on listeners
MichaelVerdon 7749305
feat: setup android for onSnapshotInSync
russellwheatley 3ed0181
feat: create ios implementation
MichaelVerdon 6f7ab49
chore: ios implementation
MichaelVerdon a23800e
chore: more ios
MichaelVerdon 20838bf
fix: bracket
MichaelVerdon 15e4ded
chore: add definition
MichaelVerdon 87c7e5f
chore: fixes
MichaelVerdon eed743a
chore: fixes
MichaelVerdon 0f44818
chore: rm wrong arg
russellwheatley d7005ce
chore: fix bugs
MichaelVerdon ae7274b
feat: change location of tests and add check on iOS
MichaelVerdon 1771cc6
feat: expose function
MichaelVerdon 9041b80
feat: add and remove listeners
MichaelVerdon 94b6082
chore: clean up tests
MichaelVerdon 763e343
chore: fixed e2e test
MichaelVerdon b131da9
chore: add multiple sync e2e test
MichaelVerdon 749b207
chore: fix formatting
MichaelVerdon 2060218
chore: cleanup
MichaelVerdon 6d624d4
chore: formatting
MichaelVerdon d1b1a80
chore: format android
MichaelVerdon faed3e4
chore: ios format
MichaelVerdon 9982f21
Update packages/firestore/ios/RNFBFirestore/RNFBFirestoreModule.m
MichaelVerdon 17d80c5
Update packages/firestore/ios/RNFBFirestore/RNFBFirestoreModule.m
MichaelVerdon 7f914b8
Update packages/firestore/ios/RNFBFirestore/RNFBFirestoreModule.m
MichaelVerdon 982262f
Update packages/firestore/ios/RNFBFirestore/RNFBFirestoreModule.m
MichaelVerdon ebca7a3
chore: remove redundant check
MichaelVerdon 313a465
chore: fix test logic promises
MichaelVerdon 3a256d5
chore: throw error on other platform
russellwheatley da39e34
chore: tests for macos
MichaelVerdon 4004df1
chore: fix test logic
MichaelVerdon 99ac64f
chore: formatting
MichaelVerdon e3353fa
chore: fix formatting issue
MichaelVerdon 515671c
chore: formatting
MichaelVerdon 3eb74d4
chore: improve e2e test
MichaelVerdon e9f0cfa
chore: formatting
MichaelVerdon b0901cd
chore: promise formatting again
MichaelVerdon fbceb35
fix: formatting
MichaelVerdon 3e8cc7f
chore: revert e2e
MichaelVerdon 8a586cf
fix: rid of redundant call
MichaelVerdon 0a5e165
fix: linter
MichaelVerdon 7839fa7
chore: change tests
MichaelVerdon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React, { useEffect } from 'react'; | ||
import { AppRegistry, Button, Text, View } from 'react-native'; | ||
|
||
import '@react-native-firebase/app'; | ||
import firestore, { onSnapshotsInSync } from '@react-native-firebase/firestore'; | ||
|
||
const fire = firestore(); | ||
function App() { | ||
let unsubscribe; | ||
useEffect(() => { | ||
unsubscribe = onSnapshotsInSync(fire, () => { | ||
console.log('onSnapshotsInSync'); | ||
}); | ||
}, []); | ||
|
||
async function addDocument() { | ||
await firestore().collection('flutter-tests').doc('one').set({ foo: 'bar' }); | ||
} | ||
|
||
return ( | ||
<View> | ||
<Text>React Native Firebase</Text> | ||
<Text>onSnapshotsInSync API</Text> | ||
<Button | ||
title="add document" | ||
onPress={async () => { | ||
try { | ||
addDocument(); | ||
} catch (e) { | ||
console.log('EEEE', e); | ||
} | ||
}} | ||
/> | ||
<Button | ||
title="unsubscribe to snapshot in sync" | ||
onPress={async () => { | ||
try { | ||
unsubscribe(); | ||
} catch (e) { | ||
console.log('EEEE', e); | ||
} | ||
}} | ||
/> | ||
</View> | ||
); | ||
} | ||
|
||
AppRegistry.registerComponent('testing', () => App); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.