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

Update ReactCSSTransitionGroup example? #57

Open
kengruven opened this issue Jul 30, 2018 · 1 comment
Open

Update ReactCSSTransitionGroup example? #57

kengruven opened this issue Jul 30, 2018 · 1 comment

Comments

@kengruven
Copy link

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!

@gadfly361
Copy link
Member

@kengruven Thanks for opening this issue!

The version of [cljsjs/react-transition-group "2.4.0-0"] that you specified will need a newer version of reagent to be compatible. This is a necessary update, and it will take me some time to update the reagent-cookbook-template, and the accompanying recipes to a newer version of reagent.

I am going to leave this ticket open, and view it as a 'TODO' item for when the update to a newer version of reagent happens.

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