-
Notifications
You must be signed in to change notification settings - Fork 25
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
Move common transaction state/mutations into statelessTransaction #96
Conversation
I think you forgot (to commit) CreateGalaxy.js! Apologies if this is a WIP PR, noticed this since I'm doing some work on #93 but realized I better wait for this one to be merged. |
} | ||
}); | ||
this.createUnsignedTxn = this.createUnsignedTxn.bind(this) | ||
this.statelessRef = React.createRef(); |
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.
The React docs say you need to add a ref
attribute to some DOM element for this to work? I know this ends up with having a pointer to the StatelessTransaction
in statelessRef.current
, but how does that hook up? I don't see it happen anywhere.
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.
Ah, good catch! I missed this one. It's there now.
Indeed I did @pkova! It's updated now. |
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.
Three times as many lines deleted as were added, I'd say this is a good refactoring. Thanks! (:
Cuts down on the state mutation boilerplate for executing transactions by moving all the common transaction details into statelessTransaction.js