mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-23 20:23:08 +00:00
Fix syntax error in 16.6 blog post (#1288)
This commit is contained in:
@@ -25,11 +25,13 @@ You may have seen [Dan's talk about React Suspense at JSConf Iceland](/blog/2018
|
||||
import React, {lazy, Suspense} from 'react';
|
||||
const OtherComponent = lazy(() => import('./OtherComponent'));
|
||||
|
||||
function MyComponent() (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<OtherComponent />
|
||||
</Suspense>
|
||||
);
|
||||
function MyComponent() {
|
||||
return (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<OtherComponent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
The Suspense component will also allow library authors to start building data fetching with Suspense support in the future.
|
||||
|
||||
Reference in New Issue
Block a user