Skip to content

Commit

Permalink
feat(docs) Исправил замечания после ревью
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Bochkarev committed Jun 10, 2024
1 parent 0588310 commit 744f477
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/6.bridge/4.plugins-and-middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Plugins now take only one argument (`nuxtApp`). You can find out more in [the do

```js [plugins/hello.ts]
export default defineNuxtPlugin(nuxtApp => {
nuxtApp.provide('injected', () => 'my injected function')
nuxtApp.provide('injected', () => 'моя инжектируемая функция')
// now available on `nuxtApp.$injected`
})
```
Expand Down
4 changes: 2 additions & 2 deletions docs/7.migration/5.plugins-and-middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ description: 'Узнайте, как мигрировать плагины и mi

```js [Nuxt 2]
export default (ctx, inject) => {
inject('injected', () => 'my injected function')
inject('injected', () => 'моя инжектируемая функция')
})
```

```ts [Nuxt 3]
export default defineNuxtPlugin(nuxtApp => {
// теперь доступно в `nuxtApp.$injected`.
nuxtApp.provide('injected', () => 'my injected function')
nuxtApp.provide('injected', () => 'моя инжектируемая функция')

// В качестве альтернативы можно использовать этот формат, который поставляется с автоматической поддержкой типов
return {
Expand Down

0 comments on commit 744f477

Please sign in to comment.