Skip to content

Releases: XantreDev/preact-signals

@preact-signals/[email protected]

04 May 17:55
7ad549c
Compare
Choose a tag to compare

Patch Changes

@preact-signals/[email protected]

23 Apr 12:45
99296c4
Compare
Choose a tag to compare

Minor Changes

  • 84b296d: - implemented $derived and $useDerived macros
    • documented state macros
  • 253049c: Added validation of esm imports from @preact-signals/utils/macro

Patch Changes

@preact-signals/[email protected]

23 Apr 12:45
99296c4
Compare
Choose a tag to compare

Patch Changes

  • 84b296d: Updated repository links

@preact-signals/[email protected]

23 Apr 12:45
99296c4
Compare
Choose a tag to compare

Patch Changes

  • 84b296d: Updated repository links

@preact-signals/[email protected]

23 Apr 12:45
99296c4
Compare
Choose a tag to compare

Patch Changes

@preact-signals/[email protected]

19 Apr 11:30
c02e4cc
Compare
Choose a tag to compare

Minor Changes

@preact-signals/[email protected]

19 Apr 11:30
c02e4cc
Compare
Choose a tag to compare

Major Changes

  • 983dd69: # Breaking change:

    Added executeOptionsOnReferenceChange (default: true) to reexectue mutation or query options callback on each reference change (for proper update depending on closuje)
    This change is addresses issue that everything is needed to be signal to work properly with `useMutation# @preact-signals/query

    const [state, setState] = useState(0);
    useMutation$(() => ({
      mutationFn,
      onSuccess: () => {
        // previous behavior - state will be recaptured only if reactive dependency changed (in case without deps it will always be 0)
        // new behavior will be synced with current state value
        console.log(state);
      },
    }));

    Old behavior is can be used with executeOptionsOnReferenceChange: false. Options callback will be reexecuted only when deps tracked by reactivity changes

    const [state, setState] = useState(0);
    useMutation$(() => ({
      mutationFn,
      executeOptionsOnReferenceChange: false,
      onSuccess: () => {
        // state will be recaptured only if reactive dependency changed (in case without deps it will always be 0)
        console.log(state);
      },
    }));

Patch Changes

  • e1ab313: Fixed work of useErrorBoundary prop for `useMutation# @preact-signals/query. Now it throws an error while mutation is failed
  • e1ab313: Fixed incorrect `useMutation# @preact-signals/query return type
  • e1ab313: Mutations options used to be never updated after mutation creation

@preact-signals/[email protected]

15 Apr 23:47
4b77292
Compare
Choose a tag to compare

Minor Changes

  • 02878e1: Removed caching from Switch component. Added Switch.Match as alias for separete Match component
  • f40d84f: Show stopped to be computed. Now reexcute on every parent render

Patch Changes

  • b7f18de: Removed unecessary signal creation in Computed

@preact-signals/[email protected]

15 Apr 23:47
4b77292
Compare
Choose a tag to compare

Patch Changes

@preact-signals/[email protected]

02 Apr 23:39
caad84f
Compare
Choose a tag to compare

Minor Changes

  • bd7e4f5: Improved implementation of $ macro. Added correcteness checks, custom Errors. Added experimental_stateMacros flag (draft - will be changed)
  • 19d63c9: - made macroses also a hooks