0.0.2 • Published 8 years ago

@act/ws v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
8 years ago

Act ws

Act ws hello world:

import main from '@act/main'
import fromSocket from '@act/ws/fromSocket'

const socket = fromSocket('ws://socket-server.com')

const view = (model) =>
  ['main', [
  	['button', { click: socket.emit('ping') }, 'Ping']
  	model
  ]]

const subscriptions = { pong: socket.on('pong') }

main(view, { model: 'No pong yet', subscriptions })

More

The documentation for this module is part of Act's docs.

0.0.2

8 years ago

0.0.1

8 years ago