Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ombori/ga-messaging

Package Overview
Dependencies
Maintainers
14
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ombori/ga-messaging

A module performing device-to-module communications for grid apps

  • 3.92.4
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-39.29%
Maintainers
14
Weekly downloads
 
Created
Source

GridApp Messaging

A module performing device-to-module communications for grid apps

Hooks

usePublish()

Returns a (type: string, payload: any) => void function, that could be used to broadcast messages to modules.

Example:

import {usePublish} from '@ombori/ga-messaging';

export default App = () => {
  const publish = usePublish();

  const handleClick = useCallback(() => {
    publish('Test.ping', {hello: 'world'});
  }, [publish])

  return <button onClick={handleClick}>pub</button>
}
useSubscribe(type: string, callback: (msg: any) => void, deps: any[]);

Subscribes to a certain message type.

useStatus(): boolean

Returns message bus connection status

useHeartbeat(): void

Sends heartbeats to GridOS, indicating that app is alive.

FAQs

Package last updated on 20 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc