1

I have a working ReactJS app and I am attempting to use animations (https://facebook.github.io/react/docs/animation.html)

I am trying to apply the transition animation to table rows as they are added. The existing working render looks like this:

return React.DOM.tbody({ valign: 'top' }, rows);

I have tried switching to this:

return React.DOM.tbody({ valign: 'top' }, React.createElement(ReactCSSTransitionGroup, {transitionName: "example"}, rows));

But I am now getting a warning and an error in the console:

React attempted to use reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server.

Error: Invariant Violation: ReactMount: Root element ID differed from reactRootID.

Any ideas?

1 Answer 1

1

I missed something obvious. The docs say:

By default ReactTransitionGroup renders as a span

So it was creating invalid markup within the table. I have set the component= property to "tr" which now works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.