Fork me on GitHub
#reagent
<
2017-07-17
>
renan00:07:16

Hi guys... How do you import external JavaScript react components in reagent / re-frame ? Example... I want import this package in my project https://www.npmjs.com/package/@atlaskit/button ... I tried using npm-lein ... But nothing...

mrchance09:07:46

@renan for accessing it at all, see here: https://clojurescript.org/reference/dependencies For using it in reagent see here: http://nicolovaligi.com/boostrap-components-reagent-clojurescript.html Basically, there is a wrapper function in reagent that adapts pure react components to work in reagent

jebberjeb14:07:33

Looking at the Reagent source trying to figure out how a watcher is registered to a particular ratom. Is it in the first deref? What exactly function is registered exactly?

juhoteperi15:07:46

React render fn captures Ratom deref calls

jebberjeb15:07:30

I think I get it

juhoteperi15:07:33

run-in-reaction -> deref-capture -> in-context -> sets \ratom-context\

jebberjeb15:07:45

thank you, it would've taken me a while to get there