Skip to content

Commit 037a5f1

Browse files
LinusBorgsynycboomdependabot[bot]boardendlarvanitis
authored
docs updates (tiny fixes) (#308)
* fix(docs): fix 'weither' typo (#282) * build(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#304) Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](faye/websocket-extensions-node@0.1.3...0.1.4) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump lodash from 4.17.15 to 4.17.19 (#306) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.15...4.17.19) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add nested routes caveats to docs (#289) (#307) * fix(docs): fix 'aleways' typo (#316) * Update caveats.md (#312) Co-authored-by: Wutichai Chansawat <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Michael Schmuki <[email protected]> Co-authored-by: Leonidas Arvanitis <[email protected]> Co-authored-by: Christopher Vrooman <[email protected]>
1 parent 5b2a113 commit 037a5f1

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

docs/api/wormhole.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ next: false
88

99
The Wormhole is not a component, it's an object that connects the `<Portal>`s to their `<PortalTarget>`s.
1010

11-
Usually, you will never need to use this object, but you _can_ use this object to programmatically send content to a `<PortalTarget>`, check weither a target exists, and other stuff.
11+
Usually, you will never need to use this object, but you _can_ use this object to programmatically send content to a `<PortalTarget>`, check whether a target exists, and other stuff.
1212

1313
:::warning Public API
1414
The wormhole object exposes quite a few properties and methods. With regard to semver, only the properties and methods documented below are considered part of the public API.
@@ -125,7 +125,7 @@ Wormhole.hasSource('origin')
125125
```
126126

127127
::: tip Server-Side Rendering
128-
For the reasons layed out in [the section about SSR](../guide/SSR.md), this method will aleways return `false` during Server-Side Rendering.
128+
For the reasons layed out in [the section about SSR](../guide/SSR.md), this method will always return `false` during Server-Side Rendering.
129129
Make sure to Read the linked section for more information.
130130
:::
131131

@@ -143,7 +143,7 @@ Wormhole.hasTarget('destination')
143143
```
144144

145145
::: tip Server-Side Rendering
146-
For the reasons layed out in [the section about SSR](../guide/SSR.md), this method will aleways return `false` during Server-Side Rendering.
146+
For the reasons layed out in [the section about SSR](../guide/SSR.md), this method will always return `false` during Server-Side Rendering.
147147
Make sure to Read the linked section for more information.
148148
:::
149149

@@ -161,6 +161,6 @@ Wormhole.hasContentFor('destination')
161161
```
162162

163163
::: tip Server-Side Rendering
164-
For the reasons layed out in [the section about SSR](../guide/SSR.md), this method will aleways return `false` during Server-Side Rendering.
164+
For the reasons layed out in [the section about SSR](../guide/SSR.md), this method will always return `false` during Server-Side Rendering.
165165
Make sure to Read the linked section for more information.
166166
:::

docs/guide/caveats.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,25 @@ next: ./migration
66

77
# Known Caveats
88

9-
Admittedly, portal-vue does a little bit of trickery to do what it does. With this come some caveats, which are documented below.
9+
Admittedly, portal-vue uses a little bit of trickery to do what it does. With this come some caveats, which are documented below.
1010

1111
## Local state lost when toggling `disabled`
1212

13-
When togling the `<portal>` component's `disabled` state, components in the portal slot are destroyed and re-created, which means any changes to their local state are lost.
13+
When toggling the `<portal>` component's `disabled` state, components in the portal slot are destroyed and re-created, which means any changes to their local state are lost.
1414

15-
if you need to persist state, use some sort of [state management](https://portal-vue-next-preview.netlify.com/)
15+
If you need to persist state, use some sort of [state management](https://portal-vue-next-preview.netlify.com/)
1616

1717
## provide/inject
1818

19-
Due to the way that Vue resolves provides from parent components, it would look for provided objects in the parent of `<portal-target>`, so any `provide`d objects of a parent of `<portal>` will not be available to components within a portal - but it will have access to those provided by parents of the `<portal-target>`.
19+
Due to the way that Vue resolves provides from parent components, it will look for provided objects in the parent of `<portal-target>`, so any `provide`d objects of a parent of `<portal>` will not be available to components within a portal - but it will have access to those provided by parents of the `<portal-target>`.
2020

2121
## `$parent`
2222

23-
For the same reason, `this.$parent` will not give your the parent of the `<Portal>`, it will give your the `<PortalTarget>`, so code relying on `$parent` might break
23+
For the same reason, `this.$parent` will not give you the parent of the `<Portal>`, instead it will give you the `<PortalTarget>`, so code relying on `$parent` might break.
24+
25+
### [vue-router](https://router.vuejs.org)
26+
27+
`<router-view>` internally walks the $parent chain to find out how many (if any) parent <router-view> components there are. Therefore `<router-view>` inside a `<portal>` will not be able to properly match its nested routes. See [#289](https://github.com/LinusBorg/portal-vue/issues/289) for discussion.
2428

2529
## `$refs`
2630

@@ -34,4 +38,4 @@ this.$nextTick().then(
3438
)
3539
```
3640

37-
the reason is that depending on the secnario, it _can_ take one tick for the content to be sent to the [Wormhole](../api/wormhole.md) (the middleman between `<Portal>` and `<PortalTarget>`), and another one to be picked up by the `<PortalTarget>`.
41+
The reason is that depending on the secnario, it _can_ take one tick for the content to be sent to the [Wormhole](../api/wormhole.md) (the middleman between `<Portal>` and `<PortalTarget>`), and another one to be picked up by the `<PortalTarget>`.

docs/guide/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ More info:
4747

4848
Previously, this event emitted the actual old and new content of the portal, which means: arrays containing vnodes.
4949

50-
There never was a real usacase for this, so we now only emit `true` or `false` depending on wether the component has content or not, which allowed us to drop a nice little bit of code.
50+
There never was a real usacase for this, so we now only emit `true` or `false` depending on whether the component has content or not, which allowed us to drop a nice little bit of code.
5151

5252
## Things we removed
5353

yarn.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8316,9 +8316,9 @@ lodash.uniq@^4.5.0:
83168316
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
83178317

83188318
[email protected], lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@~4.17.10:
8319-
version "4.17.15"
8320-
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
8321-
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
8319+
version "4.17.19"
8320+
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
8321+
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
83228322

83238323
log-symbols@^1.0.2:
83248324
version "1.0.2"
@@ -13407,9 +13407,9 @@ websocket-driver@>=0.5.1:
1340713407
websocket-extensions ">=0.1.1"
1340813408

1340913409
websocket-extensions@>=0.1.1:
13410-
version "0.1.3"
13411-
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
13412-
integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==
13410+
version "0.1.4"
13411+
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
13412+
integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==
1341313413

1341413414
whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3:
1341513415
version "1.0.5"

0 commit comments

Comments
 (0)