add an event for things like React components to listen for webclient updates
Pomax opened this issue · comments
Pomax commented
e.g.
const userInterface = ClientServer.generateClientServer(WebClientClass)
const { Component } = require('react');
const MyInterface extends Component {
constructor(props) {
super(props);
userInterface.addEventListner("webclient:update", evt => {
this.setState(evt.detail.update);
});
}
...
}
Pomax commented
added