@act/ws

0.0.2 • Public • Published

Act
A simple reactive front-end framework

 


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.

Readme

Keywords

none

Package Sidebar

Install

npm i @act/ws

Weekly Downloads

3

Version

0.0.2

License

ISC

Last publish

Collaborators

  • act