Skip to content

Releases: cesarParra/lwc-signals

v1.4.1

22 Jan 15:21
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.4.1
Date: 2025-01-22

🐞 Bug Fixes

v1.4.0

21 Jan 21:44
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.4.0
Date: 2025-01-21

✨ Features

  • circular dependecy management logic update (128d330)

v1.3.0

20 Dec 12:28
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.3.0
Date: 2024-12-20

✨ Features

  • Error handling for resources (f4f7351)

v1.2.1

18 Dec 12:58
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.2.1
Date: 2024-12-18

🐞 Bug Fixes

  • isASignal function renamed to isSignal (899ba02)

🛠️ Chores

  • kitchen sink demo images (2f3cab3)

v1.2.0

11 Dec 14:30
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.2.0
Date: 2024-12-11

✨ Features

  • Ability to read a signal value without subscribing to it via the peek function. (8dc1db3)
  • Effects and computed have a default identifier. (74f2521)
  • Improved error handling (#22) (8144196)
  • isSignal function allows to check if an object is a signal (c6be621)
  • Signals can be identified with a symbol through the "brand" property (17f7b10)

🐞 Bug Fixes

  • Computed values that return the unchanged value of a tracked signal are now recomputed when the source signal changes. (100308e)

v1.1.1

29 Nov 19:17
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.1.1
Date: 2024-11-29

🐞 Bug Fixes

v1.1.0

29 Nov 19:04
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.1.0
Date: 2024-11-29

✨ Features

  • Error handling and cyclical dependency management (#20) (97fa7fe)

  • Computed and effects now track if their internal state during their execution. They might be "computing", have an "error" or be "ready".

  • When a circular dependency is detected, an exception is thrown instead of trying the computation, to avoid infinite loops from happening.

  • When an error occurs during an execution of a computed value, the computed goes into an error state, which it keeps until recomputation is done and fixes the issue. This fixes potential infinite loops when executing computed code with errors. Reading a computed in an error state surfaces the error

v1.0.2

29 Nov 12:54
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.0.2
Date: 2024-11-29

🐞 Bug Fixes

  • Fix issues with equality (fef168f)

Fixes some issues with how equality was implemented, which was causing problems with functionality that depends on recalculating values when things change, like computed.

v1.0.1

26 Nov 12:33
Compare
Choose a tag to compare

🚀 Release Notes

Version: 1.0.1
Date: 2024-11-26

🐞 Bug Fixes

  • Reactive cycle improvements (2fa354a)

v1.1.0

21 Nov 14:24
8a6bdf4
Compare
Choose a tag to compare

What's Changed

  • Adds Release Workflow by @stanleyzapata in #13
  • Introduces the ability to make objects and array changes reactive by "tracking" them by @cesarParra in #12

Summary

To improve that experience, you can now set a track flag when creating the signal. When set to true, this will make the signal reactive to changes in the object or array properties.

📒 Think about this as using the @track decorator in LWC properties. It works the exact same way behind the scenes.

import { $signal } from "c/signals";

const obj = $signal({ x: 1, y: 2 }, { track: true });
const computedFromObj = $computed(() => obj.value.x + obj.value.y);

// When a value in the object changes, the computed value will automatically update
obj.value.x = 2;

console.log(computedFromObj.value); // 4

New Contributors

Full Changelog: 1.0.0...1.1.0