Fork me on GitHub
#reagent
<
2022-11-12
>
Bobbi Towers05:11:19

https://github.com/aengelberg/paren.party/blob/master/src/paren/party.cljs I love the way this animation is done. It simply calculates the positions based on the time. In an old episode of cognicast, @aengelberg claims he had no idea what he was doing. Is this considered a recommended approach? I don't know if it's bad form to request a code review of someone else's old project. If so I sincerely apologize.

p-himik06:11:48

I'd rename some functions (like render-something into something-view), use reactions instead of functions to make it explicit that it's a reactive thing, and avoid derefing ratoms in JS handlers even when it seems to be OK to do so. And I would not use cljsjs nowadays, remove unused imports, replace mt/every with some hand-rolled impl to avoid an extra dependency just for that simple function, and would use reagent.core/atom via reagent/atom and not by shadowing the built-in atom. Other than than, seems alright.

❤️ 1