diff --git a/README.md b/README.md index db0d1c2..a6756b0 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Aside from the `backends` option, you can define the backend to connect to entir * `VUE_APP_BACKEND_HOST` contains the hostname (e.g. `kuzzle.mydomain.com`), * `VUE_APP_BACKEND_PORT` contains the port (e.g. `443`), * `VUE_APP_BACKEND_SSL` can be set to `true` if the connection supports the SSL layer (do not set this variable if SSL is not supported). -* `VUE_APP_BACKEND_PROTO` can be set to either `http` or `websocket`. If left blank, Websocket protocol is used by default. +* `VUE_APP_BACKEND_PROTO` can be set to either `http` or `websocket`. If left blank, Websocket protocol is used by default. For example, you can build your up to connect the Websocket to `wss://kuzzle.mydomain.com:443` like the following @@ -113,3 +113,13 @@ And from anywhere in your app where the `Vue` class is available, as ```javascript Vue.prototype.$kuzzle; ``` + +### Composition API (Vue 2.7 & 3) + +In components with composition API you can use the composable to access the Kuzzle SDK instance + +```javascript +import { useKuzzle } from 'vue-plugin-kuzzle'; + +const $kuzzle = useKuzzle(); +``` diff --git a/package-lock.json b/package-lock.json index 39a1288..c80b450 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vue-plugin-kuzzle", - "version": "4.4.0", + "version": "4.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vue-plugin-kuzzle", - "version": "4.4.0", + "version": "4.5.0", "license": "Apache 2", "dependencies": { "kuzzle-sdk": "~7.x", diff --git a/package.json b/package.json index 9951cf6..02e1172 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-plugin-kuzzle", - "version": "4.4.0", + "version": "4.5.0", "description": "A Vuejs plugin shipping the Kuzzle SDK in your components", "main": "./dist/index.js", "module": "./dist/index.js",