Skip to content

Conversation

@viprogramm
Copy link

No description provided.


switch (type) {
case USER_ADD_SUCCESS:
return state.push(Map(payload.user))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше Record вместо Map


const formName = 'user-add'

const afterSubmit = (result, dispatch) => dispatch(reset(formName))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы чистил форму где-то в redux, в будущем это должно происходить после успешного добавления на сервер

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants