🌜
🌞
reflector-client

reflector-client

v0.121.0

A client for the client to client message bus

npm install reflector-client

README

Low level client for the Reflector client to client messaging system

Implements the messaging protocol that supports the Sanity real time presence exprience.

Initializing

  import Reflector from '@sanity/reflector-client'
  import myConfiguredSanityClient from './myConfiguredSanityClient'

  channel = new Reflector(mySanityClient).connect('channelName')

Listening

  channel.listen().subscribe(msg => {
    console.log(msg) // => {i: <sanity-identity>, m: <message>}
  })

Sending

  channel.send({'hello': 'sanity!'})

General

License
MIT
Typescript Types
None found
Tree-shakeable
No

Popularity

GitHub Stargazers
3,672
Community Interest
2,969
Number of Forks
323

Maintenance

Commits
10/219/220450
Last Commit
Open Issues
484
Closed Issues
690
Open Pull Requests
24
Closed Pull Requests
245

Versions

Versions Released
10/219/2201
Latest Version Released
Nov 13, 2017
Current Tags
latest0.121.0
next0.120.0-next.941943a9
focus0.122.0-focus.5d5f8af0
spaces0.122.0-spaces.bc70a23d
weakrefs0.122.0-weakrefs.962100b2

Contributors

rexxars
rexxars
Commits: 3,095
bjoerge
bjoerge
Commits: 2,661
kristofferj
kristofferj
Commits: 1,632
mariuslundgard
mariuslundgard
Commits: 941
skogsmaskin
skogsmaskin
Commits: 711
vicbergquist
vicbergquist
Commits: 242
simen
simen
Commits: 95
judofyr
judofyr
Commits: 57
benedicteb
benedicteb
Commits: 51
saasen
saasen
Commits: 49
mikolajdobrucki
mikolajdobrucki
Commits: 40
kmelve
kmelve
Commits: 30
evenwestvang
evenwestvang
Commits: 28
ricokahler
ricokahler
Commits: 6
juicycleff
juicycleff
Commits: 5