References

If you need to access directly the dom element, you can do this using props.ref, like this:

class Hello extends Component { afterMount() { setTimeout(() => { this.refs.text.style = 'color: tomato;' }, 1000) } render() { const { p } = html return ( p({ ref: 'text' }, 'Hello world' ) ) } }

Also you can access the instance of the component, like so:

class App extends Component { // ... render() { return ( Hello.v({ ref: 'hello' }, 'Hello world' ) ) } // ... }