Open
Conversation
tomalaforge
reviewed
Mar 25, 2026
| this.userModel.set(userValue); | ||
| } else { | ||
| this.userForm.reset({ firstname: '', lastname: '', age: 0, grade: 0 }); | ||
| this.userModel.set({ firstname: '', lastname: '', age: 0, grade: 0 }); |
Owner
There was a problem hiding this comment.
I created this challenge because you can avoid effect thanks to signal forms.
You should look at linkedSignals.
Everything should happen in the creation of userModel
Author
There was a problem hiding this comment.
Thanks! I updated the code to use linkedSignal.
tomalaforge
reviewed
Mar 26, 2026
| grade: 0, | ||
| }; | ||
| } | ||
| }); |
phhien203
commented
Mar 26, 2026
| const hasValue = this.userResource.hasValue(); | ||
| const user = this.userResource.value(); | ||
|
|
||
| if (hasValue && user) { |
Author
There was a problem hiding this comment.
Hi @tomalaforge , do you think it's ok to only check if (user) instead of if (hasValue && user)?
Owner
There was a problem hiding this comment.
I think, hasValue do !!user() so it's kind of the same
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✅ Challenge Submission Checklist
Start your PR title with: Answer:${challenge_number}
If you would like personal feedback or a detailed review, please support the project on GitHub:
👉 https://github.com/sponsors/tomalaforge
You can also submit a PR without sponsorship to: