-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
when HomePage initial state username is not null, submit the form to … #410
when HomePage initial state username is not null, submit the form to … #410
Conversation
When does this happen? |
@mxstbr // The initial state of the App
const initialState = fromJS({
username: 'mxstbr',
}); when username have a default value and not null, reload page doesn't load repos. |
Maybe we can rewrite it like redux-saga/examples/async demo code |
@@ -123,7 +132,8 @@ function mapDispatchToProps(dispatch) { | |||
onChangeUsername: (evt) => dispatch(changeUsername(evt.target.value)), | |||
changeRoute: (url) => dispatch(push(url)), | |||
onSubmitForm: (evt) => { | |||
evt.preventDefault(); | |||
/* eslint no-unused-expressions: ["error", { "allowShortCircuit": true }] */ |
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.
Change this to // eslint-disable-line no-unused-expressions
!
Ah, good catch, I like this solution! 👍 One small nitpick, then we can merge this fix—thanks so much! |
change it, but npm run lint not pass: 136:7 error Expected an assignment or function call and instead saw an expression no-unused-expressions
✖ 1 problem (1 error, 0 warnings) |
Yeah, I think it needs to be on the same line, but this looks fine. Thanks @suhaotian! |
@mxstbr My pleasure! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
…load repos