Bookmarks

Introducing Signals

Preact article introducing an alternative state mechanism to Hooks. As I understand it they wrap a value, providing a setter that can trigger re-renders. The main argument in their favour seems to be that they don't need memoisation as the "wrapper" itself doesn't change - only the value contained within. Preact takes this further by building Signal optimisations directly into the update cycle, allowing a Signal change to bypass VDOM diffing and just update the DOM directly.