Skip to content

Commit

Permalink
Renaming the examples error handling function to onError
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarParra committed Dec 10, 2024
1 parent 3aad04d commit f49d0d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/demo-signals/lwc/demoSignals/error-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $computed(
throw new Error("An error occurred during a computation");
},
{
errorHandler: (error /*_previousValue*/) => {
onError: (error /*_previousValue*/) => {
console.error("error thrown from computed", error);
// Allows for a fallback value to be returned when an error occurs.
return 0;
Expand All @@ -24,7 +24,7 @@ $effect(
throw new Error("An error occurred during an effect");
},
{
errorHandler: (error) => {
onError: (error) => {
console.error("error thrown from effect", error);
}
}
Expand Down

0 comments on commit f49d0d2

Please sign in to comment.