Browse Source

Fix a typo (#1344)

Seems like the MyErrorBoundary import statement has a typo
main
Frederick Ros 7 years ago
committed by Alex Krolick
parent
commit
ab79d82d95
  1. 2
      content/docs/code-splitting.md

2
content/docs/code-splitting.md

@ -194,7 +194,7 @@ function MyComponent() {
If the other module fails to load (for example, due to network failure), it will trigger an error. You can handle these errors to show a nice user experience and manage recovery with [Error Boundaries](/docs/error-boundaries.html). Once you've created your Error Boundary, you can use it anywhere above your lazy components to display an error state when there's a network error.
```js
import MyErrorBoundary from '/MyErrorBoundary';
import MyErrorBoundary from './MyErrorBoundary';
const OtherComponent = React.lazy(() => import('./OtherComponent'));
const AnotherComponent = React.lazy(() => import('./AnotherComponent'));

Loading…
Cancel
Save