Skip to content

Conversation

@AlexJsNg
Copy link

No description provided.

import DayPicker, { DateUtils } from 'react-day-picker'
import { connect } from 'react-redux'
import { filterArticles } from '../../ac'
import { FILTER_BY_DATE } from '../../constants'
Copy link
Owner

Choose a reason for hiding this comment

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

Зачем тебе эти внутряки? Мы AC придумывали, чтоб не завязываться на это в компонентах

filteredArticles: defaultArticles
}

export default (filtersState = defaultFilters, action) => {
Copy link
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