ckirkendall / kioo

Enlive/Enfocus style templating for Facebook's React and Om in ClojureScript.
Eclipse Public License 1.0
404 stars 39 forks source link

Kioo 0.4.1-SNAPSHOT + Reagent 0.4.2 component not updated when using lifecycle #48

Closed arnaudbos closed 8 years ago

arnaudbos commented 9 years ago

After a clear of my .js files and a fresh cljsbuild I'm experiencing a very frustrating and new issue I did not have before (TM) with kioo's lifecycle function.

I can't explain why, but my components aren't updated anymore IF I implement ANY lifecycle method in a defsnippet.

In order to reproduce it and isolating any specificity of my own project I've copied the example project in kioo's repository and the behavior is the same.

I've created a specific repository in order for you to test, the issue is here : https://github.com/arnaudbos/kioo-reagent/blob/master/src/kioo_example/core.cljs#L25

The only difference with the original example is I bumped the dependencies and used the lifecycle function:

kioo 0.3.0 -> 0.4.1-SNAPSHOT clojure 1.5.1 -> 1.6.0 cljsbuild 1.0.1 -> 1.0.4 clojurescript 0.0-2138 -> 0.0-2511 reagent 0.2.1 -> 0.4.2

Is it a problem with react ? reagent ? kioo ? me ?

Thanks!

francoisroyer commented 9 years ago

+1 Same issue here - I'm working with Arnaud on the same codebase :)

arnaudbos commented 9 years ago

Implementing should-update with (not= old-props new-props) fixes the issue, isn't it supposed to be optional?

See this commit: https://github.com/arnaudbos/kioo-reagent/commit/9eb9b8c145d8354447975f96d3055296a0329d83

I don't get it, is this somehow related to this ? : https://github.com/reagent-project/reagent/issues/108

ckirkendall commented 8 years ago

This was fixed recently and should be good in the 0.4.1 release. It was caused by a bug in how I implemented the lifecycle wrapper.