How to use the react-redux-firebase.withFirebase function in react-redux-firebase

To help you get started, we’ve selected a few react-redux-firebase examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nwplus / nwhacks2019 / web / components / auth / Logout / Logout.js View on Github external
return { firebase };
};

const mapDispatchToProps = (dispatch) => {
  return {
    // https://www.npmjs.com/package/redux-reset
    resetState: () => {
      dispatch({ type: 'RESET' });
    },
  };
};

export default compose(
  firebaseConnect(),
  connect(mapStateToProps, mapDispatchToProps),
)(withFirebase(Logout));
github prescottprue / react-redux-firebase / examples / complete / material / src / routes / Recover / containers / RecoverContainer.js View on Github external
<Snackbar
          open={!!this.state.message}
          message={this.state.message || 'Error'}
          autoHideDuration={4000}
          onRequestClose={() => this.setState({ message: null })}
        />
      </div>
    )
  }
}

RecoverContainer.propTypes = {
  firebase: PropTypes.object.isRequired
}

export default withFirebase(RecoverContainer)
github nwplus / nwhacks2019 / web / containers / application / Volunteer / Volunteer.js View on Github external
volunteerApplication: propTypesTemplates.application.hacker,
  changePage: PropTypes.func.isRequired,
  changeLastActiveIndex: PropTypes.func.isRequired,
  activeIndex: PropTypes.number.isRequired,
  lastValidIndex: PropTypes.number.isRequired,
  updateApplication: PropTypes.func.isRequired,
  cancelApplication: PropTypes.func.isRequired,
  resetApplicationUI: PropTypes.func.isRequired,
  featureFlags: PropTypes.object.isRequired,
  firebase: PropTypes.object,
};

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(withFirebase(VolunteerApplicationContainer));
github elliotBraem / CupSave / src / screens / Login / LoginScreen.js View on Github external
<View style={styles.btnContainer}>
            <Button style={styles.btnStyle} onPress={this.handleLogin}>
              Login
            </Button>
            <P style={styles.accountPrompt}>Don&#39;t have an account?</P>
            <Button style={styles.btnStyle} onPress={() => navigation.navigate('Signup')}>
              Sign Up
            </Button>
          </View>
        </View>
      </KeyboardAvoidingView>
    );
  }
}

export default withFirebase(LoginScreen);
github nwplus / nwhacks2019 / web / components / rsvp / index.js View on Github external
});
            }}
          />
          {submitFailed ? (<p>Failed to submit application, please try again!</p>) : null}
        </div>
      </div>
    );
  }
}

RSVP.propTypes = {
  firebase: PropTypes.object.isRequired,
  match: PropTypes.object.isRequired,
};

export default withFirebase(RSVP);
github nwplus / nwhacks2019 / web / containers / application / hacker / Hacker.js View on Github external
hackerApplication: propTypesTemplates.application.hacker,
  changePage: PropTypes.func.isRequired,
  changeLastActiveIndex: PropTypes.func.isRequired,
  activeIndex: PropTypes.number.isRequired,
  lastValidIndex: PropTypes.number.isRequired,
  updateApplication: PropTypes.func.isRequired,
  cancelApplication: PropTypes.func.isRequired,
  resetApplicationUI: PropTypes.func.isRequired,
  featureFlags: PropTypes.object.isRequired,
  firebase: PropTypes.object,
};

export default connect(
  mapStateToProps,
  mapDispatchToProps
)(withFirebase(HackerApplicationContainer));
github elliotBraem / CupSave / src / screens / Password.js View on Github external
/>
          <View style={styles.btnContainer}>
            <Button style={styles.btnStyle} onPress={this.handlePasswordChange}>
              Change Password
            </Button>
            <Button onPress={() => navigation.openDrawer()} style={styles.button}>
              Menu
            </Button>
          </View>
        </View>
      </View>
    );
  }
}

export default withFirebase(PasswordScreen);
github nwplus / nwhacks2019 / web / components / rsvp / volunteer / index.js View on Github external
});
            }}
          />
          {submitFailed ? (<p>Failed to submit application, please try again!</p>) : null}
        </div>
      </div>
    );
  }
}

volunteerRSVP.propTypes = {
  firebase: PropTypes.object.isRequired,
  match: PropTypes.object.isRequired,
};

export default withFirebase(volunteerRSVP);
github elliotBraem / CupSave / src / screens / Loading.js View on Github external
firebase.auth().onAuthStateChanged(user => {
      navigation.navigate(user ? 'App' : 'Auth');
    });
  }

  render() {
    return (
      <View style={styles.container}>
        <Text>Loading</Text>
        <ActivityIndicator size="large" />
      </View>
    );
  }
}

export default withFirebase(LoadingScreen);