Skip to content

Releases: XantreDev/preact-signals

@preact-signals/utils@0.22.1

17 Jul 22:38
22be07e
Compare
Choose a tag to compare

Patch Changes

  • 661a86e: babel plugin: removed unexpected logging

@preact-signals/query@2.0.7

17 Jul 22:38
22be07e
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [661a86e]
    • @preact-signals/utils@0.22.1

@preact-signals/utils@0.22.0

03 Jul 01:00
b2fe3c2
Compare
Choose a tag to compare

Minor Changes

  • dcd7e2c: Implemented experimental_stateMacrosOptimization for automatic optimization of state macroses in JSX

    Example:

    import { $state, $derived } from "@preact-signals/utils/macro";
    
    let a = $state(10);
    let b = $state(20);
    
    const c = <>{a * b + 10}</>;

    Will be optimized to:

    import { deepSignal as _deepSignal, $ as _$ } from "@preact-signals/utils";
    
    let a = _deepSignal(10);
    let b = _deepSignal(20);
    
    const c = <>{_$(() => a.value * b.value + 10)}</>;

    In result your components will have less rerender when using state bindings

  • f706a6e: Removed experimental_ prefix from stateMacro options of @preact-signals/utils/babel

    Migration (Vite):

    import { defineConfig } from "vite";
    import react from "@vitejs/plugin-react";
    
    // https://vitejs.dev/config/
    export default defineConfig({
      plugins: [
        react({
          babel: {
            plugins: [
              "module:@preact-signals/safe-react/babel",
              [
                "module:@preact-signals/utils/babel",
                {
    -              experimental_stateMacros: true,
    +              stateMacros: true,
                },
              ],
            ],
          },
        }),
      ],
    });

@preact-signals/query@2.0.6

03 Jul 01:00
b2fe3c2
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [dcd7e2c]
  • Updated dependencies [f706a6e]
    • @preact-signals/utils@0.22.0

@preact-signals/utils@0.21.0

02 Jun 10:54
acfad8e
Compare
Choose a tag to compare

Minor Changes

  • b29dbc5: Disallow reexports from macro lib
  • b29dbc5: Added $deref feature for state macroses to get actual state macro reference

@preact-signals/query@2.0.5

02 Jun 10:54
acfad8e
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [b29dbc5]
  • Updated dependencies [b29dbc5]
    • @preact-signals/utils@0.21.0

@preact-signals/utils@0.20.2

16 May 04:01
258cdc2
Compare
Choose a tag to compare

Patch Changes

  • 1b339b4: Fixed incorrect babel transform of state macro identifier inside of $

@preact-signals/query@2.0.4

16 May 04:01
258cdc2
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [1b339b4]
    • @preact-signals/utils@0.20.2

@preact-signals/utils@0.20.1

10 May 17:06
5d4f3eb
Compare
Choose a tag to compare

Patch Changes

  • 79d2ace: Updated @babel/helper-module-imports
  • 3801b85: [babel]: started to refernce variables

@preact-signals/query@2.0.3

10 May 17:06
5d4f3eb
Compare
Choose a tag to compare

Patch Changes

  • Updated dependencies [79d2ace]
  • Updated dependencies [3801b85]
    • @preact-signals/utils@0.20.1