Add support for data-transition attributes used by Push.js #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been using React-ratchet to build an app that supports server-side rendering. One useful facility provided by Ratchet is Push.js, a tool that takes a page load and animates the transition between pages. To enable that, Push.js looks for a
data-transition
attribute on links.This changeset adds support for an optional
transition
prop on the<TableViewCell>
and<NavButton>
components, that get added as adata-
attribute on the generated links. This is only strictly necessary on the<TableViewCell>
because<NavButton>
automatically copies all its props to attributes, but I thought it better to have a consistent interface. I've added tests too, but there's probably a neater way to write them.I also had to make some tweaks to the
package.json
file to make the test suite run (as I was hitting errors along these lines), but these could be backed out if they're not universally applicable.