Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
With this implementation, the alert will be shown when you have 2 or 3 of them checked, and then you uncheck one (because
name || age || address
will still be true if any of them are true). I think that's not what @tomalaforge wants. I think he wants the alert to show when each checkbox is checked, independent of the state of any other, but not as the result of unchecking.Thomas can clarify, of course.
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.
Yes but i wasn't really sure what is part of the challenge and what's not. This is the simplest solution without changing the code a lot. As thomas already mentioned, this could be solved with a computed signal as well. I already have some things in mind, i'll update the docs for this challenge.
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 think we need clarification on the requirements.
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.
@LMFinney you are right, but I didn't go that far 😅
My goal was to trigger the effect when we check or uncheck one checkbox which is not the case if the first one is true. But I didn't think of your case @LMFinney; So I should change the instruction to be clearer indeed 👍