react

"mulling over state management stuff"
lilactown 2020-12-28T18:41:01.084400Z

something that's tripped us up at work a few times is the differences between dev and release builds, and optimizing keywords:

(let [foo :foo]
  (hooks/use-effect
   [foo]
   (js/console.log "bar")))
☝️:skin-tone-2: in development, this will fire every render; in a release build, it will only fire once

lilactown 2020-12-28T18:41:20.084700Z

I'm thinking of turning off this optimization

lilactown 2020-12-28T18:43:13.086200Z

another option could be to hoist static keywords in helix's analyzer/compiler, but that sounds real complicated and wouldn't cover all cases - e.g. passing in a keyword returned by a function (keyword "foo")