keller-mark / anyhtmlwidget

Bringing core concepts from anywidget to R
https://keller-mark.github.io/anyhtmlwidget/
Other
13 stars 1 forks source link

Widgets as S3 or R6 subclass with esm property #2

Closed keller-mark closed 5 months ago

keller-mark commented 5 months ago

The problem with the standalone function is there is no way to attach data values and "listen" for value changes to trigger a re-render. However R6 has the notion of setter functions that can add logic that will be performed on value assignments. S3 has something analogous

keller-mark commented 5 months ago

Will perhaps only be useful outside shiny context since shiny already triggers rerenders within the reactive expression