diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /doc/development/fe_guide/vue.md | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'doc/development/fe_guide/vue.md')
-rw-r--r-- | doc/development/fe_guide/vue.md | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/development/fe_guide/vue.md b/doc/development/fe_guide/vue.md index b947d90cc11..fecb0af936d 100644 --- a/doc/development/fe_guide/vue.md +++ b/doc/development/fe_guide/vue.md @@ -123,6 +123,10 @@ Using dependency injection to provide values from HAML is ideal when: prop-drilling becomes an inconvenience. Prop-drilling when the same prop is passed through all components in the hierarchy until the component that is genuinely using it. +Dependency injection can potentially break a child component (either an immediate child or multiple levels deep) if the value declared in the `inject` configuration doesn't have defaults defined and the parent component has not provided the value using the `provide` configuration. + +- A [default value](https://vuejs.org/guide/components/provide-inject.html#injection-default-values) might be useful in contexts where it makes sense. + ##### props If the value from HAML doesn't fit the criteria of dependency injection, use `props`. @@ -499,7 +503,7 @@ component under test, with the `computed` property, for example). Remember to us We should test for events emitted in response to an action in our component. This is used to verify the correct events are being fired with the correct arguments. -For any DOM events we should use [`trigger`](https://vue-test-utils.vuejs.org/api/wrapper/#trigger) +For any DOM events we should use [`trigger`](https://v1.test-utils.vuejs.org/api/wrapper/#trigger) to fire out event. ```javascript @@ -530,7 +534,7 @@ it('should fire the itemClicked event', () => { ``` We should verify an event has been fired by asserting against the result of the -[`emitted()`](https://vue-test-utils.vuejs.org/api/wrapper/#emitted) method. +[`emitted()`](https://v1.test-utils.vuejs.org/api/wrapper/#emitted) method. ## Vue.js Expert Role |