-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat: Support Multiple Derivation Paths in UI #317
Conversation
const handleDerivationPathRemove = (index: number) => { | ||
const newPaths = [...derivationPaths]; | ||
newPaths.splice(index, 1); | ||
setDerivationPaths(newPaths); | ||
}; | ||
|
||
const handleDerivationPathChange = ( | ||
index: number, | ||
e: ChangeEvent<HTMLInputElement> | ||
) => { | ||
const newPaths = [...derivationPaths]; | ||
newPaths[index].path = e.target.value; | ||
setDerivationPaths(newPaths); |
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.
When deriving state from previous state like this, we should use the function parameter for setState
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.
Thanks for the review, I had some free time and adjusted the code.
Description
Closes # (issue)
Checklist:
Type of change. This type of change is the main reason for the PR.
Breaking changes