Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Store dates as strings #114

Merged
merged 2 commits into from
Jan 4, 2018
Merged

Store dates as strings #114

merged 2 commits into from
Jan 4, 2018

Conversation

RichieAHB
Copy link
Contributor

None string dates where causing problems where we were comparing filters for deep equality, which would require traversing the whole of a moment object. And when using === equal dates would return false.

To stop potentialy useage of date object and consistency
startDate,
endDate
});
import moment from 'moment';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes in chartActions and chartsReducer is moving business logic from one place to the other. Mainly to make sure that moment dates don't make it into the reducer and potentially get stored. Also, while it doesn't especially matter in the app at present, it's best practice for async reasons: reduxjs/redux#1171

@RichieAHB RichieAHB merged commit 34a1db2 into master Jan 4, 2018
@susiecoleman susiecoleman deleted the rb-store-dates-as-strings branch January 4, 2018 12:57
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.

2 participants