@@ -217,7 +217,6 @@ This is how you would use `react-async-component` in a "browser only" React appl
217
217
218
218
Let's imagine a Component that describes your application:
219
219
220
- __ MyApp.js__ :
221
220
``` jsx
222
221
// 👇 create an async component
223
222
const AsyncHome = createAsyncComponent ({
@@ -236,7 +235,6 @@ export default function MyApp() {
236
235
237
236
And then a module that renders it:
238
237
239
- __ client.js__ :
240
238
``` jsx
241
239
import React from ' react' ;
242
240
import { render } from ' react-dom' ;
@@ -267,7 +265,6 @@ This is how you would use `react-async-component` in a "server side rendering" R
267
265
268
266
Let's imagine a Component that describes your application:
269
267
270
- __ MyApp.js__ :
271
268
``` jsx
272
269
// 👇 create an async component
273
270
const AsyncHome = createAsyncComponent ({
@@ -287,7 +284,6 @@ export default function MyApp() {
287
284
288
285
And then a module that does the browser/client side rendering:
289
286
290
- __ client.js__ :
291
287
``` jsx
292
288
import React from ' react' ;
293
289
import { render } from ' react-dom' ;
@@ -314,7 +310,6 @@ withAsyncComponents(app)
314
310
315
311
And then an express middleware (you could use any http server of your choice) to do the rendering:
316
312
317
- __ reactApplicationMiddlware.js__ :
318
313
``` jsx
319
314
import React from ' react' ;
320
315
import { withAsyncComponents } from ' react-async-component' ; // 👈
0 commit comments