Table of Contents
actionsPrefix
Prefix for all actions within library
Type: string
Examples
import { constants } from 'react-redux-firebase'
constants.actionsPrefix === '@@reactReduxFirebase' // true
actionTypes
Object containing all action types
Type: object
Properties
STARTstring@@reactReduxFirebase/STARTSETstring@@reactReduxFirebase/SETREMOVEstring@@reactReduxFirebase/REMOVEMERGEstring@@reactReduxFirebase/MERGESET_PROFILEstring@@reactReduxFirebase/SET_PROFILELOGINstring@@reactReduxFirebase/LOGINLOGOUTstring@@reactReduxFirebase/LOGOUTLOGIN_ERRORstring@@reactReduxFirebase/LOGIN_ERRORNO_VALUEstring@@reactReduxFirebase/NO_VALUEUNAUTHORIZED_ERRORstring@@reactReduxFirebase/UNAUTHORIZED_ERRORERRORstring@@reactReduxFirebase/ERRORSET_LISTENERstring@@reactReduxFirebase/SET_LISTENERUNSET_LISTENERstring@@reactReduxFirebase/UNSET_LISTENERAUTHENTICATION_INIT_STARTEDstring@@reactReduxFirebase/AUTHENTICATION_INIT_STARTEDAUTHENTICATION_INIT_FINISHEDstring@@reactReduxFirebase/AUTHENTICATION_INIT_FINISHEDSESSION_STARTstring@@reactReduxFirebase/SESSION_STARTSESSION_ENDstring@@reactReduxFirebase/SESSION_ENDFILE_UPLOAD_STARTstring@@reactReduxFirebase/FILE_UPLOAD_STARTFILE_UPLOAD_ERRORstring@@reactReduxFirebase/FILE_UPLOAD_ERRORFILE_UPLOAD_PROGRESSstring@@reactReduxFirebase/FILE_UPLOAD_PROGRESSFILE_UPLOAD_COMPLETEstring@@reactReduxFirebase/FILE_UPLOAD_COMPLETEFILE_DELETE_STARTstring@@reactReduxFirebase/FILE_DELETE_STARTFILE_DELETE_ERRORstring@@reactReduxFirebase/FILE_DELETE_ERRORFILE_DELETE_COMPLETEstring@@reactReduxFirebase/FILE_DELETE_COMPLETEAUTH_UPDATE_STARTstring@@reactReduxFirebase/AUTH_UPDATE_STARTAUTH_UPDATE_ERRORstring@@reactReduxFirebase/AUTH_UPDATE_ERRORAUTH_UPDATE_SUCCESSstring@@reactReduxFirebase/AUTH_UPDATE_SUCCESSPROFILE_UPDATE_STARTstring@@reactReduxFirebase/PROFILE_UPDATE_STARTPROFILE_UPDATE_ERRORstring@@reactReduxFirebase/PROFILE_UPDATE_ERRORPROFILE_UPDATE_SUCCESSstring@@reactReduxFirebase/PROFILE_UPDATE_SUCCESSEMAIL_UPDATE_STARTstring@@reactReduxFirebase/EMAIL_UPDATE_STARTEMAIL_UPDATE_ERRORstring@@reactReduxFirebase/EMAIL_UPDATE_ERROREMAIL_UPDATE_SUCCESSstring@@reactReduxFirebase/EMAIL_UPDATE_SUCCESSAUTH_RELOAD_STARTstring@@reactReduxFirebase/AUTH_RELOAD_STARTAUTH_RELOAD_ERRORstring@@reactReduxFirebase/AUTH_RELOAD_ERRORAUTH_RELOAD_SUCCESSstring@@reactReduxFirebase/AUTH_RELOAD_SUCCESSAUTH_LINK_STARTstring@@reactReduxFirebase/AUTH_LINK_STARTAUTH_LINK_ERRORstring@@reactReduxFirebase/AUTH_LINK_ERRORAUTH_LINK_SUCCESSstring@@reactReduxFirebase/AUTH_LINK_SUCCESSAUTH_EMPTY_CHANGEstring@@reactReduxFirebase/AUTH_LINK_SUCCESS
Examples
import { actionTypes } from 'react-redux-firebase'
actionTypes.SET === '@@reactReduxFirebase/SET' // true
defaultConfig
Default configuration options
Type: object
Properties
userProfilestringnullLocation on Firebase where user profiles are stored. Often set to'users'.profileFactoryFunctionnullFunction for changing how profile is written to database (both RTDB and Firestore).presence(string | Function)nullLocation on Firebase where of currently online users is stored. Often set to'presence'or'onlineUsers'. If a function is passed, the arguments are:(currentUser, firebase).sessions(string | Function)sessionsLocation on Firebase where user sessions are stored (only if presense is set). Often set to'sessions'or'userSessions'. If a function is passed, the arguments are:(currentUser, firebase).enableLoggingbooleanfalseWhether or not firebase database logging is enabled. Providingtrueturns on error logging (enabled by itself throughlogErrors).logErrorsbooleantrueWhether or not to log internal Firebase errors (i.e. error querying or writing data) to the javascript console .preserveOnLogout(Array | object)nullData parameters to preserve when logging out. If Array is passed, each item represents keys within state.firebase.data preserve. If an object is passed, Keys associate with parts of state to preserve, and the values are Arrays contain keys for keys within that slice of state to preserve.preserveOnEmptyAuthChangeobjectnullData parameters to preserve when empty auth changes occur. Keys associate with parts of state to preserve, and the values are either Arrays or Functions. If passing an array of keys (i.e.{ auth: ['key1', 'key2'] }) - those keys ('key1'and'key2') are preserved from that slice of state (auth). If passing a function (i.e.{ auth: (currentAuthState, nextAuthState) => ({}) }), whatever is returned from the function is set to that slice of state (auth).updateProfileOnLoginbooleantrueWhether or not to update user profile when logging in.useFirestoreForProfilebooleanfalseWrite profile data to Firestore instead of Real Time Database.useFirestoreForStorageMetabooleanfalseWrite storage file metadata to Firestore instead of Real Time Database.resetBeforeLoginbooleantrueWhether or not to reset auth and profile when logging in (see issue #254 for more details).enableRedirectHandlingbooleantrueWhether or not to enable redirect handling. This must be disabled if environment is not http/https such as with react-native.onAuthStateChangedFunctionnullFunction that runs when auth state changes.enableEmptyAuthChangesbooleanfalseWhether or not to enable empty auth changes. When set to true,onAuthStateChangedwill be fired with, empty auth changes such asundefinedon initialization (see #137). Requiresv1.5.0-alphaor higher.autoPopulateProfilebooleanfalseREMOVED FROM v2.0.0. Whether or not to automatically populate profile with data loaded through profileParamsToPopulate config.setProfilePopulateResultsbooleantrueWhether or not to call SET actions for data that results from populating profile to redux under the data path. For example role parameter on profile populated from 'roles' root. True will call SET_PROFILE as well as a SET action with the role that is loaded (places it in data/roles).dispatchOnUnsetListenerbooleantrueWhether or not to dispatch UNSET_LISTENER when disabling listeners for a specific path. USE WITH CAUTION Setting this to true allows an action to be called that removes data from redux (which might not always be expected).dispatchRemoveActionbooleanfalseWhether or not to dispatch REMOVE action when callingremove. NOTE Causes two state updates if a listener is affected by your remove call.firebaseStateNamestring 'firebase' Assumed name of Firebase state (name given when passing reducer to combineReducers). Used in firebaseAuthIsReady promise (see #264).attachAuthIsReadybooleantrueWhether or not to attach firebaseAuthIsReady to store. authIsLoaded can be imported and used directly instead based on preference.firestoreNamespacebooleanfirestoreHelpersNamespace for firestore helpers (WARNING Changing this will break firestoreConnect HOC. Do NOT change to'firestore')keysToRemoveFromAuthArray (default at end) list of keys to remove from authentication reponse before writing to profile (currenlty only used for profiles stored on Firestore).['appName', 'apiKey' , 'authDomain', 'redirectEventId', 'stsTokenManager', 'uid']