Skip to content

HT3: implement filter by title and date#36

Open
ch3rn0v wants to merge 1 commit intoromabelka:masterfrom
ch3rn0v:HT3
Open

HT3: implement filter by title and date#36
ch3rn0v wants to merge 1 commit intoromabelka:masterfrom
ch3rn0v:HT3

Conversation

@ch3rn0v
Copy link
Copy Markdown

@ch3rn0v ch3rn0v commented May 27, 2018

No description provided.

@ch3rn0v ch3rn0v changed the title implement filter by title and date HT3: implement filter by title and date May 27, 2018
this.props.fetchData && this.props.fetchData()
}

getFilteredArticles() {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

ок, но еще лучше делать фильтрацию в коннекте

Comment thread src/reducer/articles.js
case DELETE_ARTICLE:
return articleState.filter((article) => article.id !== payload.id)

case FILTER_ARTICLES_BY_TITLE:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Лучше храни отдельно статьи и отдельно значения фильтров. Саму фильтрацию можешь потом сделать в коннекте, при необходимости

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