Skip to content

Instantly share code, notes, and snippets.

@malerba118
Last active December 5, 2020 01:56
const App = createComponent(() => {
const divEl$ = observable(null);
// Do something any time our "ref" changes
observe(divEl$, (divEl) => {
console.log(divEl)
});
return (props, state) => (
<div ref={divEl$.set}>
{/*...*/}
</div>
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment