Posts by Lucas Santana • 139 points
9 posts
-
1
votes1
answer178
viewsA: Run function managed by Redux
You need to do a Dispatch to add your role in connect. Ex: import actions from 'myActions' ... const mapStateToProps = state => ({ message: state.LoginReducer.message }); const mapDispatchToProps…
-
0
votes2
answers802
viewsA: Extract formatted_address from JSON return from Google Maps API
The problem is that you are using the state before it upgrade. Try to run with willMount like this: componentWillMount() { navigator.geolocation.getCurrentPosition( (position) => {…
react-nativeanswered Lucas Santana 139 -
1
votes1
answer213
viewsA: Problems returning the address through geolocation
The problem is in your componentDidMount, the getCurrentPosition is an asynchronous function, so when you call the Geocoder.geocodePosition in their state latitude and longitude are still null. Try…
react-nativeanswered Lucas Santana 139 -
1
votes1
answer428
viewsA: Use Geocoder to return the device address
The Geocoder.geocodePosition returns a Promise, so you should capture the address with .then. Ex: Geocoder.geocodePosition(coords) .then(res => { this.setState({address: res[0].formatedAddress}…
react-nativeanswered Lucas Santana 139 -
1
votes2
answers92
viewsA: In firebase, how do you read the value of the users' "Created in" metadata?
You can capture this data using firebase CLI with the command: firebase auth:export account_file --format=file_format where account_file is the name of the file where the data will be saved and…
-
0
votes1
answer132
viewsA: RN Navigation - Draw Navigator
I managed using with Stack and Drawer. In my case Drawer is the first screen of the Stack and it works. The code is like this: const Drawer = DrawerNavigator({ HomeDrawer: { screen: HomeScreen },…
-
1
votes1
answer349
viewsA: React-Native Asyncstorage returna null
The problem is why firebase.database(). ref('/Team/'). Child is an asynchronous call. When you call Asyncstorage.setItem your message object has not yet been completed. You need to ensure that the .…
-
2
votes3
answers887
viewsA: FIREBASE + NODEJS error: Firebase App named '[DEFAULT]' already exists
This error usually occurs when the function firebase.initializeApp(firebaseConfig) is called more than once. Check where it is occurring is called, if it is not in a loop or if it is being called…
-
0
votes1
answer481
viewsQ: Image Upload with Firebase and React Native using RN Image-Picker
I am using the React-Native-image-Picker component to capture an image that must be saved in firebase. I’m using the following code: firebaseApp.storage().ref('/images/').child('teste')…