Skip to content
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

Merged
merged 4 commits into from
May 28, 2016
Merged

when HomePage initial state username is not null, submit the form to … #410

merged 4 commits into from
May 28, 2016

Conversation

suhaotian
Copy link
Contributor

…load repos

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 98.286% when pulling 2135588 on suhaotian:initialRenderCorrectWhenUsernameIsNotNull into 302c974 on mxstbr:master.

@mxstbr
Copy link
Member

mxstbr commented May 28, 2016

When does this happen?

@suhaotian
Copy link
Contributor Author

@mxstbr
app/containers/HomePage/reducer.js

// 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.

@suhaotian
Copy link
Contributor Author

suhaotian commented May 28, 2016

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 }] */
Copy link
Member

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!

@mxstbr
Copy link
Member

mxstbr commented May 28, 2016

Ah, good catch, I like this solution! 👍 One small nitpick, then we can merge this fix—thanks so much!

@suhaotian
Copy link
Contributor Author

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)

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 98.286% when pulling 39ba5dd on suhaotian:initialRenderCorrectWhenUsernameIsNotNull into 302c974 on mxstbr:master.

@mxstbr
Copy link
Member

mxstbr commented May 28, 2016

Yeah, I think it needs to be on the same line, but this looks fine. Thanks @suhaotian!

@mxstbr mxstbr merged commit fadaf52 into react-boilerplate:master May 28, 2016
@suhaotian
Copy link
Contributor Author

@mxstbr My pleasure!

@lock
Copy link

lock bot commented May 29, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants