Grammar + spelling.

This commit is contained in:
Kenan Banks 2020-06-05 16:42:58 -04:00 committed by GitHub
parent 5a9c33b222
commit ff809cbc05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ When using Babel, youll need to make sure that Babel can parse the dynamic im
Weckpack's default behaviour, is to name them as `x.js` where x is an incremental number depending on how many dynamic
chunks you are importing in your code.
This will give a very poorly view of which file is loading what code.
This will give a poor view of which file is loading what code.
To fix that, webpack introduced magic comments, with which a chunk can be named as follows (ie: `math.js`).
@ -59,14 +59,14 @@ import(/* webpackChunkName: "math" */ './math').then(math => {
```
>NOTE:
>When using [Server Side Rendering](/docs/server-side-rendering/), make sure comment and file path are exacly in the same order as above.
>When using [Server Side Rendering](/docs/server-side-rendering/), make sure comment and file path are exactly in the same order as above.
## Code Splitting + React
React supports code splitting out of the box with [`React.lazy`](https://reactjs.org/docs/code-splitting.html#reactlazy). However it has [some limitations](/docs/loadable-vs-react-lazy), this is why `@loadable/component` exists.
In a React application, most of the time you want to split your components. Splitting a component implies to be able to wait for this component to be loaded (showing a fallback during loading) but also to handle errors.
In a React application, most of the time you want to split your components. Splitting a component implies the ability to wait for this component to be loaded (showing a fallback during loading) but also to handle errors.
**Example of component splitting:**