Skip to content

v1.3.0 / v1.3.1 - Effectless Components

Latest
Compare
Choose a tag to compare
@delph123 delph123 released this 19 Jul 23:23
f16e345

What's New

  • Support effectless components in #31

A new API for components is supported

Old convention of returning an effect from a component, even when the effect does not consume any signal directly, will continue to work:

function CounterButton() {
  const [count, setCount] = createSignal(0);

  return () => (
    <button onClick={() => setCount(count() + 1)}>{count}</button>
  );
}

But effectless components are now also supported, providing a more easy coding path:

function CounterButton() {
  const [count, setCount] = createSignal(0);
  return <button onClick={() => setCount(count() + 1)}>{count}</button>
}

Bugfix

  • Cleanup elements when disposing iterators in #30

Miscellaneous

  • Use supplejs-testing-library in #28

Full Changelog: v1.2.2...v1.3.1