Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- firebase.auth().onAuthStateChanged((user) => {
- if (user) {
- firebase.database().ref('Usuarios').on('value', (snapshot) => {
- let state = this.state;
- state.list = [];
- snapshot.forEach((childItem) => {
- state.list.push({
- key: childItem.key,
- titulo: childItem.val().titulo,
- nome: childItem.val().nome,
- });
- });
- this.setState(state);
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement