Skip to content

Commit 80244d4

Browse files
rkunevkazupon
authored andcommitted
docs: Improve wording and fix 'readble' typo (vuejs#176)
1 parent 5d40166 commit 80244d4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

en/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ See [Introducing the Server Bundle](./bundle-renderer.md) and [Build Configurati
3838

3939
- #### `renderer.renderToStream(vm[, context]): stream.Readable`
4040

41-
Render a Vue instance to a [Node.js readble stream](https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_readable_streams). The context object is optional. See [Streaming](./streaming.md) for more details.
41+
Render a Vue instance to a [Node.js readable stream](https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_readable_streams). The context object is optional. See [Streaming](./streaming.md) for more details.
4242

4343
## `Class: BundleRenderer`
4444

@@ -50,7 +50,7 @@ See [Introducing the Server Bundle](./bundle-renderer.md) and [Build Configurati
5050

5151
- #### `bundleRenderer.renderToStream([context]): stream.Readable`
5252

53-
Render the bundle to a [Node.js readble stream](https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_readable_streams). The context object is optional. See [Streaming](./streaming.md) for more details.
53+
Render the bundle to a [Node.js readable stream](https://nodejs.org/dist/latest-v8.x/docs/api/stream.html#stream_readable_streams). The context object is optional. See [Streaming](./streaming.md) for more details.
5454

5555
## Renderer Options
5656

en/css.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ A few things to take note when importing CSS from an NPM dependency:
8585

8686
1. It should not be externalized in the server build.
8787

88-
2. If using CSS extraction + vendor extracting with `CommonsChunkPlugin`, `extract-text-webpack-plugin` will run into problems if the extracted CSS in inside an extracted vendors chunk. To work around this, avoid including CSS files in the vendor chunk. An example client webpack config:
88+
2. If using CSS extraction + vendor extracting with `CommonsChunkPlugin`, `extract-text-webpack-plugin` will run into problems if the extracted CSS is inside an extracted vendors chunk. To work around this, avoid including CSS files in the vendor chunk. An example client webpack config:
8989

9090
``` js
9191
module.exports = {

en/streaming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ stream.on('error', err => {
2828

2929
In stream rendering mode, data is emitted as soon as possible when the renderer traverses the Virtual DOM tree. This means we can get an earlier "first chunk" and start sending it to the client faster.
3030

31-
However, when the first data chunk is emitted, the child components may not even be instantiated yet, neither will their lifecycle hooks get called. This means if the child components need to attach data to the render context in their lifecycle hooks, these data will not be available when the stream starts. Since a lot of the context information (like head information or inlined critical CSS) needs to be appear before the application markup, we essentially have to wait until the stream to complete before we can start making use of these context data.
31+
However, when the first data chunk is emitted, the child components may not even be instantiated yet, neither will their lifecycle hooks get called. This means if the child components need to attach data to the render context in their lifecycle hooks, these data will not be available when the stream starts. Since a lot of the context information (like head information or inlined critical CSS) needs to appear before the application markup, we essentially have to wait until the stream to complete before we can start making use of these context data.
3232

3333
It is therefore **NOT** recommended to use streaming mode if you rely on context data populated by component lifecycle hooks.

0 commit comments

Comments
 (0)