Skip to content

Clean up data-react-checksum after checksum match #1578

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

Closed
wants to merge 1 commit into from
Closed

Clean up data-react-checksum after checksum match #1578

wants to merge 1 commit into from

Conversation

syranide
Copy link
Contributor

Primarily to go with #1570, (then) the final DOM would be completely clean of React markup in the end, even if you use server-rendering. Which I think would be nice given that it's virtually for free.

Not that it really matters, but I also made it safe to use with any hash (not just a numeric one), it should also save a byte or two in size.

@sophiebits
Copy link
Collaborator

Wouldn't existingChecksum be "0" and thus be truthy? I don't know that there's any advantage to removing the attribute.

@syranide
Copy link
Contributor Author

@spicyj Yeah you're right, I confused the JavaScript (and PHP) type-casting rules, !!"0" = true in JavaScript, so yep.

There's no advantage to removing the attribute other than "cleanliness".

@syranide syranide changed the title Clean up data-react-checksum after checksum match and fix super unlikely bug Clean up data-react-checksum after checksum match May 21, 2014
@zpao
Copy link
Member

zpao commented Jul 1, 2014

I like the initiative :) But meh. Let's come back to it if we go with that clean DOM thing.

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.

3 participants