<template>
	<div>
		{{ data }}
	</div>
</template>

<script>
import { tryOnMounted } from '@vueuse/core'
import connectWebsocket from '~/composables/connectWebsocket'

export default {
	name: 'IndexPage',
	setup() {
		const { data, send, open } = connectWebsocket()

		tryOnMounted(() => {
			open()
		})

		return {
			send,
			data,
			open,
		}
	},
}
</script>
