Re: [whatwg/dom] Basic DOM reactivity (Issue #1049)

I’m not sure what the example is showing exactly. It seems like there could be some context missing about what exactly `createEffect` is meant to do. The comment says “replaces the textContent of the element.” On the surface that sounds like the existing textContent setter:

```js
let triggerEffect = value => domElement.textContent = `Hello ${ value }`;
triggerEffect("world");
```

Is the function-factory-function-that-accepts-a-function part doing something else besides this?

(...if not, “remove the necessity of complicated reactive libraries” might already be done!)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1049#issuecomment-1019782787

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1049/1019782787@github.com>

Received on Monday, 24 January 2022 07:09:20 UTC