inhumate-rti-vue
v1.1.2
Published
Inhumate RTI Vue integration
Downloads
10
Readme
Inhumate RTI Vue Integration
Installing
npm install --save inhumate-rti-vue
Quick Start
In main.ts
:
import rti from "inhumate-rti-vue"
app.use(rti, { application: "Vue RTI App" })
In a component, if using pinia, use the store to access the RTI client:
import { useRtiStore } from "inhumate-rti-vue"
const rti = useRtiStore()
rti.client.subscribeText("hello", (msg) => console.log("Received: ", msg))
rti.client.whenConnected(() => rti.client.publishText("hello", "Hello World!"))
Or, if not using pinia, the RTI client can be injected:
import { inject } from "vue"
const rti = inject("rti-client")
rti.subscribeText("hello", (msg) => console.log("Received: ", msg))
rti.whenConnected(() => rti.publishText("hello", "Hello World!"))
Building and running the sandbox app
Dependencies
- Node (version 20 tested)
- Vue 3
- The Javascript client built
Clone the project from GitHub, and in the vue
folder:
npm install
npm run build # to build the library
npm start # to run the sandbox app
Feedback & Contributing
Feedback and contributions of any kind are welcome.
- Please file bug reports and/or feature requests as GitHub issues
- Suggest code changes by creating a pull request
- For any other questions, comments or inquiries, get in touch