Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History
 
 

recipes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Recipes

This section includes some recipes for using react-redux-firebase within real applications.

Recipes for using/modifying built in profile handling.

Examples

  • Enable User profiles
  • Change Profile Format

Recipes for using roles with permissions. For example: Admin, user, user-paid.

Actions for uploading files with Firebase storage including uploadFiles and uploadFile as well as direct access to Firebase.storage().

Examples

  • Upload Files
  • Upload a String as a file

Standard actions for interacting with Firebase including push, set, uniqueSet, update, and remove.

Examples

  • Write data
  • Remove Data
  • Writing key from a push to another location
  • Writing to multiple locations

Actions that dispatch other actions and have access to redux state

Examples

  • Async API Calls (REST or Javascript API)
  • Actions based on state (including browser history)
  • Displaying error after invalid write attempt

Middleware that listens for Actions and dispatches other, often async, actions.

Examples

  • Debounced persisting of user input: Listen for typing actions from redux-form -> call firebase.update()
  • Throttled/Debounced API calls
  • Displaying a system wide error: Listen for error actions -> display error message

Change location within your application based on Firebase state.

Examples

  • Route Protection (user redirected to /login if not authenticated)
  • Redirect to / if user visits /login when authenticated
  • Show/Hide components based on user profile data such as role: 'admin' or isAdmin: true