Skip to content

Commit

Permalink
add hint about state loos to caveats page
Browse files Browse the repository at this point in the history
see #113
  • Loading branch information
LinusBorg authored Sep 4, 2018
1 parent 3f47ab6 commit b67fd3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/docs/caveats.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ The result of that trick is that in Devtools, a component that you nested inside
<ComponentX>
```

## local state lost when toggling `disabled`

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.

## provide/inject broken

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>`.
Expand Down

0 comments on commit b67fd3b

Please sign in to comment.