You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above install command will install the `@latest` tag. You may also use the following tags when installing to get different versions:
47
47
48
-
*`@next` - Next upcoming release. Currently points to active progress with `v1.5.0-*` pre-releases
49
-
*`@canary` - Most possible up to date code. Currently points to active progress with `v2.0.0-*` pre-releases. *Warning:* Syntax is different than current stable version.
48
+
*`@next` - Next upcoming release. Currently, points to active progress with `v1.5.0-*` pre-releases
49
+
*`@canary` - Most possible up to date code. Currently, points to active progress with `v2.0.0-*` pre-releases. *Warning:* Syntax is different than current stable version.
50
50
51
51
Other versions docs are available using the dropdown on the above docs link. For quick access:
Be aware of changes when using version that are tagged `@latest`. Please report any issues you encounter, and try to keep an eye on the [releases page](https://github.com/prescottprue/react-redux-firebase/releases) for updates.
55
+
Be aware of changes when using a version that is tagged `@latest`. Please report any issues you encounter, and try to keep an eye on the [releases page](https://github.com/prescottprue/react-redux-firebase/releases) for updates.
56
56
57
57
## Use
58
58
59
-
**Note:** If you are just starting a new project, you may want to use [`v2.0.0`](http://docs.react-redux-firebase.com/history/v2.0.0/#use) since it is has an even easier syntax. For clarity on the transition, view the [`v1` -> `v2` migration guide](http://docs.react-redux-firebase.com/history/v2.0.0/docs/v2-migration-guide.html)
59
+
**Note:** If you are just starting a new project, you may want to use [`v2.0.0`](http://docs.react-redux-firebase.com/history/v2.0.0/#use) since it has an even easier syntax. For clarity on the transition, view the [`v1` -> `v2` migration guide](http://docs.react-redux-firebase.com/history/v2.0.0/docs/v2-migration-guide.html)
60
60
61
61
Include `reactReduxFirebase` in your store compose function and `firebaseStateReducer` in your reducers:
In order to enable this functionality, you will most likely need to install a plugin (depending on your build setup). For Webpack and Babel, you will need to make sure you have installed and enabled [babel-plugin-transform-decorators-legacy](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy) by doing the following:
207
+
To enable this functionality, you will most likely need to install a plugin (depending on your build setup). For Webpack and Babel, you will need to make sure you have installed and enabled [babel-plugin-transform-decorators-legacy](https://github.com/loganfsmyth/babel-plugin-transform-decorators-legacy) by doing the following:
208
208
209
209
1. run `npm i --save-dev babel-plugin-transform-decorators-legacy`
Copy file name to clipboardExpand all lines: docs/api/compose.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ Middleware that handles configuration (placed in redux's
48
48
profileParamsToPopulate config. (default: `true`)
49
49
-`config.setProfilePopulateResults`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to
50
50
call SET actions for data that results from populating profile to redux under
51
-
the data path. For example: role paramter on profile populated from 'roles'
51
+
the data path. For example role parameter on profile populated from 'roles'
52
52
root. True will call SET_PROFILE as well as a SET action with the role that
53
53
is loaded (places it in data/roles). (default: `false`)
Copy file name to clipboardExpand all lines: docs/api/constants.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Default configuration options
71
71
profileParamsToPopulate config.
72
72
-`setProfilePopulateResults`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to
73
73
call SET actions for data that results from populating profile to redux under
74
-
the data path. For example: role paramter on profile populated from 'roles'
74
+
the data path. For example role parameter on profile populated from 'roles'
75
75
root. True will call SET_PROFILE as well as a SET action with the role that
76
76
is loaded (places it in data/roles).
77
77
-`distpatchOnUnsetListener`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`false` Whether or not to
Copy file name to clipboardExpand all lines: docs/api/helpers.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Detect whether items are loaded yet or not
17
17
18
18
**Parameters**
19
19
20
-
-`item`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Item to check loaded status of. A comma seperated list is also acceptable.
20
+
-`item`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Item to check loaded status of. A comma separated list is also acceptable.
Copy file name to clipboardExpand all lines: docs/recipes/epics.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
Epics are particularly useful for responding to actions (often described as a "sidecar").
3
3
4
4
## Setup
5
-
Examples below assume that you have setup `redux-observable` middleware so that firebase is available within your epics. Here is an example `combineEpics` function that adds `getFirebase` as third argument along with an epic that uses it:
5
+
Examples below assume that you have setup `redux-observable` middleware so that firebase is available within your epics. Here is an example `combineEpics` function that adds `getFirebase` as the third argument along with an epic that uses it:
Copy file name to clipboardExpand all lines: docs/recipes/profile.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ connect(({ firebase }) => ({
35
35
36
36
**NOTE:** This feature is only available in [`v1.5.*`](http://docs.react-redux-firebase.com/history/v1.5.0/docs/recipes/profile.html)
37
37
38
-
The current users profile can be updated by using the `updateProfile` method, which is [only available in `v1.5.*`](http://docs.react-redux-firebase.com/history/v1.5.0/docs/recipes/profile.html).
38
+
Profile of the current user can be updated by using the `updateProfile` method, which is [only available in `v1.5.*`](http://docs.react-redux-firebase.com/history/v1.5.0/docs/recipes/profile.html).
39
39
40
40
## Change How Profiles Are Stored
41
41
The way user profiles are written to the database can be modified by passing the `profileFactory` parameter.
@@ -60,7 +60,7 @@ const config = {
60
60
To list online users and/or track sessions, view the [presence recipe](http://docs.react-redux-firebase.com/history/v2.0.0/docs/recipes/auth.html#list-of-online-users-presence)
61
61
62
62
## Populate Parameters
63
-
If profile object contains an key or a list of keys as parameters, you can populate those parameters with the matching value from another location on firebase.
63
+
If profile object contains a key or a list of keys as parameters, you can populate those parameters with the matching value from another location on firebase.
64
64
65
65
#### List
66
66
profile.contacts contains a list of user UIDs that should be populated from the users list like so:
Copy file name to clipboardExpand all lines: docs/recipes/roles.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@ Though there are many patterns, we are going to use the following terminology:
6
6
7
7
**Role** - job function or title which defines authority level (i.e. admin or manager). A user has a role, a role as permissions.
8
8
9
-
**Permissions** - approval of a mode of access (i.e. todos) . Multiple permissions can assigned to a single role.
9
+
**Permissions** - approval of a mode of access (i.e. todos) . Multiple permissions can be assigned to a single role.
10
10
11
11
## Data Setup
12
12
13
13
Add the Roles collection in Firebase. It should be a sibling of the `users` collection. For example:
14
14
15
-
_Tip: you can import below JSON directly into Firebase. Alternatively you can populate it in the start of your application or when you deploy to Firebase._
15
+
_Tip: you can import below JSON directly into Firebase. Alternatively, you can populate it in the start of your application or when you deploy to Firebase._
16
16
17
17
```js
18
18
{
@@ -48,7 +48,7 @@ Each user should have a role parameter that correlates to a role. For example:
48
48
49
49
## Config
50
50
51
-
In order for us to check our role for permissions, we will want to populate the role on profile. This will turn the role string (i.e. admin) into the object representing that role from the roles collection.
51
+
In order for us to check our role for permissions, we will want to populate the role on a profile. This will turn the role string (i.e. admin) into the object representing that role from the roles collection.
52
52
53
53
Make sure you have the following config when creating your store:
54
54
@@ -78,7 +78,7 @@ reactReduxFirebase(
78
78
)
79
79
```
80
80
81
-
**Note:** beware that the `role` parameter on each user will remain a string, and won't actually be "converted" into a object. Something that may be apparant to some developers, but not to others ;-)
81
+
**Note:** beware that the `role` parameter on each user will remain a string, and won't be "converted" into an object. Something that may be apparent to some developers, but not to others ;-)
Copy file name to clipboardExpand all lines: docs/recipes/routing.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Routing Recipes
2
2
3
-
These recipes assume that you are using [`react-router`](https://github.com/ReactTraining/react-router), but the principles should be applicable to any routing solution.
3
+
These recipes assume that you are using [`react-router`](https://github.com/ReactTraining/react-router), but the principles should apply to any routing solution.
4
4
5
5
#### React Router 4
6
6
@@ -10,7 +10,7 @@ Progress on supporting react-router 4 [is tracked within this issue](https://git
10
10
11
11
## Basic
12
12
13
-
Routing can be changed based on data by using react lifecycle hooks such as `componentWillMount`, and `componentWillReceiveProps` to route users. This can be particularly useful when doing things such as route protection (only allowing user to view a route if they are logged in):
13
+
Routing can be changed based on data by using react lifecycle hooks such as `componentWillMount`, and `componentWillReceiveProps` to route users. This can be particularly useful when doing things such as route protection (only allowing a user to view a route if they are logged in):
0 commit comments