Subscribing to Property Changes for a Custom Perspective Component

I have built a custom perspective component based on the Ignition SDK example. The module that contains the component has been successfully installed on the gateway and it works as expected. I am now trying expand on the component and I want to get notified when a component property changes. I have created a test view where I have a couple of standard components bound to my custom component properties. In my custom module, I subscribe to the property changes using the this.props.store.subscribe() method. After launching the test view session, I change a property value. In the web browser console log, I see a message that the property doesn't exist in the this.props.store. When I log the this.props.store to the console, there are no properties in the subscriptionMap. I was under the impression that the component properties automatically get added to the subscriptionMap. What am I missing?

I figured it out. I subscribed to the wrong object. I should have used this.props.store.props.subscribe().

1 Like