Skip to content
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

Optional/configurable reviver #23

Closed
sorccu opened this issue Oct 13, 2016 · 4 comments
Closed

Optional/configurable reviver #23

sorccu opened this issue Oct 13, 2016 · 4 comments

Comments

@sorccu
Copy link

sorccu commented Oct 13, 2016

Definitely no offense meant in any way, but I'm one of those people who really care about the raw HTML output, and I find the JSON.date_parser snippet quite annoying to look at, especially since I don't even need it right now. I was wondering if it would be possible to do one of the following:

  1. Make the reviver removable for apps that don't need it
  2. Make the reviver snippet fully configurable so that it could either be completely removed or replaced with custom content

I'm kind of feeling that the reducer should take care of converting the initial state if necessary.

@catamphetamine
Copy link
Owner

So, what you're talking about is to introduce an option for completely disabling JSON.date_parser?

@catamphetamine
Copy link
Owner

Why would anyone not want Redux store dates to be recreated upon client-side reinitialization?

@catamphetamine
Copy link
Owner

Well, ok, Date is not strictly a JSON value, so I introduced a common parse_dates option which can be set to false.

Also now removing redux-router data from Redux store when generating html page.
Seems to have no effect, so it's a bit cleaner.

@sorccu
Copy link
Author

sorccu commented Oct 14, 2016

Thanks. I was thinking that if the reviver takes care of Dates already, perhaps it should be replaceable so that it could potentially take care of something else as well, like deserializing a custom class maybe? Anyway I don't have that need right now so it's more of a theoretical issue.

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

No branches or pull requests

2 participants