-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(database): fix increment not defined #8377
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -1,4 +1,5 @@ | |||
import { getApp } from '@react-native-firebase/app'; | |||
import { firebase } from '..'; // Needed for increment() method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this brings more of the namespaced stuff into the new modular implementation...is it possible to import the ServerValue directly and use it directly (below)? There should be a way to import that ServerValue or we have bigger problems (which may also be the case: #8329 is currently a problem it appears - resolving both at once would be a big win
increment(delta) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikehardy
Adding
import DatabaseStatics from '../DatabaseStatics';
const { ServerValue } = DatabaseStatics;
seems to work. Is this what you had in mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SelaseKay Yep, that's what I had in mind! Small difference in practice but it is thinking forward to the time when the non-modular index.js / index.d.ts files go away. This has it already more set up for the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikehardy Nice. I've added the necessary changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this tweak could the reason this PR doesn't seem to have fixed the issue for us - at least, it's the best theory I've got.
More info: #8375 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
@mikehardy I suppose it's safe to close #8329 as well. |
|
Description
closes #8375
Related issues
Release Summary
Checklist
Android
iOS
Other
(macOS, web)e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter