Skip to content

Commit 0b98886

Browse files
committed
update Readme
1 parent 78fdaef commit 0b98886

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class MyComponent extends RxReact.Component {
153153
}
154154
}
155155
```
156-
Note that when you extend lifecycle methods: `componentWillMount` `componentWillReceiveProps` and `componentWillUnMount`, You must call the `super` method.
156+
Note that when you extend lifecycle methods, you must call the `super` method.
157157
158158
> Before the 0.3.x versions `RxReact.Component` also implemented lifecyle mixin behavior, for some perf reasons and because most of the time it's unnecessary this has been removed.
159159
> If you want reenable this behavior use `FuncSubject` as lifecycle method, or manually apply the `LifecycleMixin` on your class.
@@ -220,5 +220,33 @@ You can also create a `FuncSubject` that extends [`BehaviorSubject`](https://git
220220
221221
222222
```javascript
223-
var myHandler = FuncSubject.behavior(intialValue, mapFunction)
223+
var subject = FuncSubject.behavior(intialValue, mapFunction)
224+
```
225+
226+
227+
### FuncSubject.async
228+
229+
You can also create a `FuncSubject` that extends [`AsyncSubject`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/subjects/asyncsubject.md). simply use the `async` function exposed by `FuncSubject`:
230+
231+
232+
```javascript
233+
var subject = FuncSubject.async(mapFunction)
234+
```
235+
236+
### FuncSubject.replay
237+
238+
You can also create a `FuncSubject` that extends [`ReplaySubject`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/subjects/replaysubject.md). simply use the `replay` function exposed by `FuncSubject`:
239+
240+
241+
```javascript
242+
var subject = FuncSubject.replay(bufferSize, mapFunction)
243+
```
244+
245+
### FuncSubject.replay
246+
247+
You can create a `FuncSubject` from any subject base class using the `factory` function expsed by `FuncSubject`:
248+
249+
250+
```javascript
251+
var subject = FuncSubject.factory(SubjectClass, mapFunction, ...constructorArgs);
224252
```

0 commit comments

Comments
 (0)