-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor (components): Wizard instead full form, add loader #9
Conversation
Now list can have only 10 items on start, and loader can load more items if need
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.
Асинхронные экшены освоены). Поработай над обработкой ошибок и загрузкой(loading indicator)
...this.state, contact: this.props.contact, | ||
}) | ||
} | ||
} |
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.
Обычно за этим eslint следит, постарайся методы жизненного цикла на верху компонента держать, кроме render - он внизу
contact: { | ||
}, | ||
contact: {}, | ||
step: 'personal', |
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.
Это лучше сделать константой над компонентом, а не строкой в коде.
{/*<label htmlFor="comment" className="contact-create-form__label">Comment:</label>*/} | ||
{/*<input name="comment" id="comment" type="text" placeholder="Comment" className="contact-create-form__input" value={this.state.contact.phone} onChange={this.handleInputChange}/>*/} | ||
{/*</div>*/} | ||
{/*</div>*/} |
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.
ну и коменты лучше не комитить
import { connect } from 'react-redux' | ||
import AdditionalStep | ||
from '../AdditionalStep' | ||
import { saveContactData } from '../../../actions/actions' |
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.
Now list can have only 10 items on start, and loader can load more items if need