From ff809cbc05ff2b31d23592d7b33aa41a458b0149 Mon Sep 17 00:00:00 2001 From: Kenan Banks Date: Fri, 5 Jun 2020 16:42:58 -0400 Subject: [PATCH] Grammar + spelling. --- website/src/pages/docs/code-splitting.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/src/pages/docs/code-splitting.mdx b/website/src/pages/docs/code-splitting.mdx index a6c5957..fb394e3 100644 --- a/website/src/pages/docs/code-splitting.mdx +++ b/website/src/pages/docs/code-splitting.mdx @@ -48,7 +48,7 @@ When using Babel, you’ll 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:**