Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update ReactCSSTransitionGroup example? #57

@kengruven

Description

@kengruven

The ReactCSSTransitionGroup example says it's for when "You want to use ReactCSSTransitionGroup in your reagent web application".

The React animation docs say the "add-on" version is deprecated, though:

ReactTransitionGroup and ReactCSSTransitionGroup have been moved to the react-transition-group package that is maintained by the community. Its 1.x branch is completely API-compatible with the existing addons.

Fortunately, the latest version (2.4.0) of react-transition-group is in cljsjs, so it looks like it should be straightforward to update.

Instead of:

[reagent "0.5.1" :exclusions [cljsjs/react]]
[cljsjs/react-with-addons "0.13.3-0"]

it'd be:

[reagent "0.5.1"]
[cljsjs/react-transition-group "2.4.0-0"]

and the adapt-react-class call would need to be something like:

(def css-transition-group
  (reagent/adapt-react-class react-transition-group/CSSTransition))

Also, .foo-leave would need to be updated to .foo-exit.

I'm still missing something, though, because the compiled JS is giving me a ReferenceError. Help welcome!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions