@@ -71,14 +71,10 @@ in the `main` entrypoint of your Dart application.
71
71
` ` ` dart
72
72
import ' dart:html' ;
73
73
74
- import ' package:react/react_client.dart' as react_client;
75
74
import ' package:react/react.dart' ;
76
75
import ' package:react/react_dom.dart' as react_dom;
77
76
78
77
main () {
79
- // This should be called once at the beginning of the application.
80
- react_client.setClientConfiguration ();
81
-
82
78
// Something to render... in this case a simple < div> with no props, and a string as its children.
83
79
var component = div({}, " Hello world!" );
84
80
@@ -137,16 +133,12 @@ var aButton = button({"onClick": (SyntheticMouseEvent event) => print(event)});
137
133
138
134
import ' dart:html' ;
139
135
140
- import ' package:react/react_client.dart' as react_client;
141
136
import ' package:react/react.dart' ;
142
137
import ' package:react/react_dom.dart' as react_dom;
143
138
144
139
import ' cool_widget.dart' ;
145
140
146
141
main() {
147
- // This should be called once at the beginning of the application.
148
- react_client.setClientConfiguration();
149
-
150
142
react_dom.render(CoolWidget({}), querySelector(' # react_mount_point'));
151
143
}
152
144
` ` `
@@ -173,16 +165,12 @@ var CoolWidget = registerComponent(() => new CoolWidgetComponent());
173
165
174
166
import ' dart:html' ;
175
167
176
- import ' package:react/react_client.dart' as react_client;
177
168
import ' package:react/react.dart' ;
178
169
import ' package:react/react_dom.dart' as react_dom;
179
170
180
171
import ' cool_widget.dart' ;
181
172
182
173
main () {
183
- // This should be called once at the beginning of the application.
184
- react_client.setClientConfiguration ();
185
-
186
174
react_dom.render(CoolWidget({" text" : " Something" }), querySelector(' #react_mount_point' ));
187
175
}
188
176
` ` `
@@ -225,16 +213,12 @@ class CoolWidgetComponent extends Component2 {
225
213
226
214
import ' dart:html' ;
227
215
228
- import ' package:react/react_client.dart' as react_client;
229
216
import ' package:react/react.dart' ;
230
217
import ' package:react/react_dom.dart' as react_dom;
231
218
232
219
import ' cool_widget.dart' ;
233
220
234
221
void main () {
235
- // This should be called once at the beginning of the application.
236
- react_client.setClientConfiguration ();
237
-
238
222
react_dom.render(
239
223
myComponent(
240
224
headline: " My custom headline" ,
@@ -352,7 +336,6 @@ Here is an example of how to use React React.addons.TestUtils. within a Dart tes
352
336
```dart
353
337
import ' package:test/test.dart' ;
354
338
import ' package:react/react.dart' as react;
355
- import ' package:react/react_client.dart' as react_client;
356
339
import ' package:react/react_dom.dart' as react_dom;
357
340
import ' package:react/react_test_utils.dart' as react_test_utils;
358
341
@@ -372,8 +355,6 @@ class MyTestComponent extends react.Component2 {
372
355
var myTestComponent = react.registerComponent(() => new MyTestComponent());
373
356
374
357
void main() {
375
- react_client.setClientConfiguration();
376
-
377
358
test(' should click button and set span text to " success" ' , () {
378
359
var component = react_test_utils.renderIntoDocument(myTestComponent({}));
379
360
0 commit comments