Posts by Douglas Henrique • 46 points
3 posts
-
0
votes1
answer24
viewsA: React: How can I send data to this.state
Try to use it this way: getUserData = () => { let ref = firebase.database().ref('/'); ref.on('value', snapshot => { const {clientes} = snapshot.val(); this.setState({clientes: clientes}); //…
-
1
votes1
answer235
viewsA: How to view value saved by Asyncstorage?
One of the great advantages of working with class method is the life cycle modes, what I would recommend is to use a componentDidMount so that when starting the application the state has the correct…
-
2
votes1
answer115
viewsA: Map to list products in React with dropdown, how to open specific dropdown of each product?
The solution I would use in that case would be a ternary which would cause the following changes in the code: Would receive the index in the map: this.state.products.map((product,index) => ( Pass…