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
### Description
* Adds versions capability to docs through [versions-select plugin](https://github.com/prescottprue/gitbook-plugin-verions-select)
* Simplifies pull request template
* Fixes typo causing error while building gitbook (`objectivec` instead of `objc` for prism plugin)
### Check List
- [X] All tests passing
- [X] Docs updated with any changes or examples
- [X] Added tests to ensure feature(s) work properly
### Relevant Issues
* #154
* #162
Copy file name to clipboardExpand all lines: docs/api/connect.md
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,4 @@
1
-
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
2
-
3
-
### Table of Contents
4
-
5
-
-[firebaseConnect](#firebaseconnect)
6
-
7
-
## firebaseConnect
1
+
# firebaseConnect
8
2
9
3
**Extends React.Component**
10
4
@@ -13,7 +7,6 @@ to provided firebase paths using React's Lifecycle hooks.
13
7
14
8
**Parameters**
15
9
16
-
-`dataOrFn` (optional, default `[]`)
17
10
-`watchArray`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array of objects or strings for paths to sync from Firebase. Can also be a function that returns the array. The function is passed the current props and the firebase object.
Returns **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not item is loaded
30
18
31
-
##isEmpty
19
+
# isEmpty
32
20
33
21
Detect whether items are empty or not
34
22
35
23
**Parameters**
36
24
37
-
-`data`
38
25
-`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.
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Data located at path within Immutable Map
61
49
62
-
##pathToJS
50
+
# pathToJS
63
51
64
52
Convert parameter from Immutable Map to a Javascript object
65
53
66
54
**Parameters**
67
55
56
+
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
68
57
-`data`
69
58
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path from state.firebase to convert to JS object
70
59
-`notSetValue`**([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\|[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** Value to use if data is not available
71
-
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Data located at path within Immutable Map
83
71
84
-
##dataToJS
72
+
# dataToJS
85
73
86
74
Convert parameter under "data" path of Immutable Map to a Javascript object.
87
75
**NOTE:** Setting a default value will cause `isLoaded` to always return true
88
76
89
77
**Parameters**
90
78
79
+
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
91
80
-`data`
92
81
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of parameter to load
93
82
-`notSetValue`**([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\|[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** Value to return if value is not
94
83
found in redux. This will cause `isLoaded` to always return true (since
95
84
value is set from the start).
96
-
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
97
85
98
86
**Examples**
99
87
@@ -118,17 +106,17 @@ const defaultValue = {
118
106
119
107
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Data located at path within Immutable Map
120
108
121
-
##orderedToJS
109
+
# orderedToJS
122
110
123
111
Convert parameter under "ordered" path of Immutable Map to a
124
112
Javascript array. This preserves order set by query.
125
113
126
114
**Parameters**
127
115
116
+
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
128
117
-`data`
129
118
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of parameter to load
130
119
-`notSetValue`**([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\|[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** Value to return if value is not found
131
-
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Data located at path within Immutable Map
143
131
144
-
##
132
+
#populatedDataToJS
145
133
146
134
Convert parameter under "data" path of Immutable Map to a
147
135
Javascript object with parameters populated based on populates array
148
136
149
137
**Parameters**
150
138
151
139
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
140
+
-`data`
152
141
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of parameter to load
153
142
-`populates`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array of populate objects
154
143
-`notSetValue`**([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\|[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** Value to return if value is not found
Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Data located at path within Immutable Map
179
168
180
-
##customToJS
169
+
# customToJS
181
170
182
171
Load custom object from within store
183
172
184
173
**Parameters**
185
174
186
-
-`data`
175
+
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
187
176
-`path`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Path of parameter to load
177
+
-`customPath`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Part of store from which to load
178
+
-`data`
188
179
-`custom`
189
180
-`notSetValue`**([Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)\|[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)\|[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean))** Value to return if value is not found
190
-
-`firebase`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Immutable Map to be converted to JS object (state.firebase)
191
-
-`customPath`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Part of store from which to load
Copy file name to clipboardExpand all lines: docs/api/reducer.md
+3-9Lines changed: 3 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,4 @@
1
-
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
2
-
3
-
### Table of Contents
4
-
5
-
-[firebaseStateReducer](#firebasestatereducer)
6
-
7
-
## firebaseStateReducer
1
+
# firebaseStateReducer
8
2
9
3
Reducer for react redux firebase. This function is called
10
4
automatically by redux every time an action is fired. Based on which action
@@ -13,8 +7,8 @@ changes.
13
7
14
8
**Parameters**
15
9
16
-
-`state`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Current Redux State (optional, default `initialState`)
17
-
-`action`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Action which will modify state (optional, default `{}`)
10
+
-`state`**[Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)** Current Redux State
11
+
-`action`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Action which will modify state
18
12
-`action.type`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of Action being called
19
13
-`action.data`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Type of Action which will modify state
0 commit comments