-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: signals in Oryx #1989
docs: signals in Oryx #1989
Conversation
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/reactive-components.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
docs/scos/dev/front-end-development/202212.0/oryx/reactivity/signals.md
Outdated
Show resolved
Hide resolved
} | ||
``` | ||
|
||
In the above example, the `logProductCode` effect will automatically start when `MyComponent` is connected to the DOM, logging the product code everytime $product signal will update. Once the component is disconnected from the DOM, the effect will automatically stop. This directive simplifies effect management by automatically linking them to component lifecycles, making your component code cleaner and easier to manage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, avoid future tenses as much as possible. Also, this sentence looks unclear, so consider rephrasing or splitting it into two smaller ones: "In the preceding example, the logProductCode
effect automatically starts when MyComponent
is connected to the DOM, logging the product code every time, and the $product signal updates."
In the above example, the `logProductCode` effect will automatically start when `MyComponent` is connected to the DOM, logging the product code everytime $product signal will update. Once the component is disconnected from the DOM, the effect will automatically stop. This directive simplifies effect management by automatically linking them to component lifecycles, making your component code cleaner and easier to manage. | |
In the above example, the `logProductCode` effect starts automatically when `MyComponent` is connected to the DOM, logging the product code every time the $product signal updates. Once the component is disconnected from the DOM, the effect automatically stops. This directive simplifies effect management by automatically linking them to component lifecycles, making your component code cleaner and easier to manage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
improved
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
…ignals.md Co-authored-by: Vadym Sachenko <vadym.sachenko@spryker.com>
|
||
You can initialize signals with options to adjust their behavior: | ||
|
||
- `equal`: allows for a custom equality function between two consecutive signal values. By default, strict comparison is used. Implementing your own function gives control over when a signal updates, avoiding unnecessary updates and performance costs when new and old values are practically identical. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gives control over when a signal updates
Please clarify the meaning of this or update this sentence to improve clarity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the docs with a slightly different intro to the signal topic and a small tweak in the text above.
Documentation of signals in Oryx.
closes HRZ-2767