Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 1.83 KB

README.md

File metadata and controls

59 lines (39 loc) · 1.83 KB

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