Class: ComponentSubscription

ComponentSubscription(setup, connection)

Represents a subscription for a specific component in the application. Extends SocketSubscription class.

Constructor

new ComponentSubscription(setup, connection)

Creates an instance of ComponentSubscription.

Parameters:
Name Type Description
setup Object

Configuration options for the subscription.

connection Object

The connection object for managing the subscription.

setup.component Object

The component object associated with the subscription.

Source:

Members

component :Object

The component object associated with the subscription.

Type:
  • Object
Source:

type :string

Type identifier for the subscription (component).

Type:
  • string
Source:

Methods

appendComponent()

Appends the current component subscription to the connection.

Source:

setClientChangeListener()

Sets up the client change listener for component updates.

Source:

toClient()

Sends the component data to the client.

Source:

toClientError(error)

Sends error data to the client in case of component subscription error.

Parameters:
Name Type Description
error Object

The error object to be sent to the client.

Source:

updateComponent(mergeData)

Updates the component data by merging the provided data.

Parameters:
Name Type Description
mergeData Object

The data object to be merged with the component.

Source: