This file contains 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
// src/actions/AutenticacaoActions.js | |
export const cadastraUsuario = ({ nome, email, senha }) => { | |
// action de callback | |
// gerenciado pelo dispatch do Redux-Thunk | |
// fica intermediando nossa aplicação com o Redux | |
return dispatch => { | |
// ACTION PARA EVOLUIR ESTADO DA ACTION CADASTRO EM ANDAMENTO | |
dispatch({ type: CADASTRO_EM_ANDAMENTO }) | |
auth.createUserWithEmailAndPassword(email, senha) |
This file contains 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
// src/components/Loading.js | |
import React, { Component } from 'react' | |
import { View, Text, ActivityIndicator, StyleSheet, ImageBackground } from 'react-native' | |
import firebase from 'react-native-firebase' | |
import { AsyncStorage } from 'react-native'; | |
import { auth } from '../firebase' | |
export default class Loading extends Component { | |
async componentDidMount() { |
This file contains 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
// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers. | |
//raiz_do_projeto/functions/index.js | |
const functions = require('firebase-functions'); | |
// The Firebase Admin SDK to access the Firebase Realtime Database. | |
const admin = require('firebase-admin'); | |
const _ = require('lodash'); | |
admin.initializeApp(functions.config().firebase); |