Initial discussion at #54
Parts of the discussion are copied below for context:
Forgo could allow libraries to implement this if component had a method to modify attributes before they're put onto the DOM. Something like:
function someFunc() {
transformAttr(name, value, args) {
if (name.startsWith('on')) {
return autoRedraw(value, args);
}
return value;
},
render() {...}
}
Then you could imagine a library exposing this the same way forgo-state accepts a component and returns a component with modified lifecycle methods.
Pair this with wanting click handlers to run inside the component's error boundary and we've got two examples where modifying DOM node attributes is useful.
Initial discussion at #54
Parts of the discussion are copied below for context:
Initial proposal by @spiffytech
Forgo could allow libraries to implement this if component had a method to modify attributes before they're put onto the DOM. Something like:
Then you could imagine a library exposing this the same way forgo-state accepts a component and returns a component with modified lifecycle methods.
Pair this with wanting click handlers to run inside the component's error boundary and we've got two examples where modifying DOM node attributes is useful.