@@ -38,6 +38,26 @@ let MyElement = Cycle.component('MyElement', function definition() {
38
38
interactions .get (' OnTickEvent' ); // Observable<T>
39
39
```
40
40
41
+ ## this
42
+
43
+ The third parameter of ` definitionFn ` is ` self ` , which represents ` this ` of
44
+ your created React class.
45
+
46
+ Normally, you don't want to use this. However, it might be required for
47
+ working with some React components.
48
+
49
+ Example:
50
+
51
+ ``` js
52
+ let Navigation = require (' react-router' ).Navigation ;
53
+ let options = {
54
+ mixins: [Navigation]
55
+ };
56
+ let MyElement = Cycle .component (' MyElement' , function (_1 , _2 , self ) {
57
+ return Rx .Observable .just (< div onClick= {() => self .goBack ()}> Go back< / div> );
58
+ }, options);
59
+ ```
60
+
41
61
## Lifecycle events
42
62
43
63
You can query your component's
@@ -95,26 +115,6 @@ let MyElement = Cycle.component('MyElement', function () {
95
115
}, options);
96
116
```
97
117
98
- ## this
99
-
100
- The third parameter of ` definitionFn ` is ` self ` , which represents ` this ` of
101
- your created React class.
102
-
103
- Normally, you don't want to use this. However, it might be required for
104
- working with some React components.
105
-
106
- Example:
107
-
108
- ``` js
109
- let Navigation = require (' react-router' ).Navigation ;
110
- let options = {
111
- mixins: [Navigation]
112
- };
113
- let MyElement = Cycle .component (' MyElement' , function (_1 , _2 , self ) {
114
- return Rx .Observable .just (< div onClick= {() => self .goBack ()}> Go back< / div> );
115
- }, options);
116
- ```
117
-
118
118
## react-hot-loader
119
119
120
120
Cycle-React supports
0 commit comments