Fork me on GitHub
#clojurescript
<
2019-09-07
>
sova-soars-the-sora13:09:45

Hi, I'm having trouble using disable to disable a button element

sova-soars-the-sora13:09:18

is there an idiomatic way to disable buttons once they are clicked?

dpsutton14:09:17

somewhere you need to store information that a button has been clicked. be it a r/atom, rf/dispatch [:button-clicked ]) whatever. and then your disabled is based on that

dpsutton14:09:48

there's no particular idiom at play. the disabled state is a function of your components state

sova-soars-the-sora14:09:49

is rf/dispatch reagent?

dpsutton14:09:09

no. the rf there is re-frame. those being the two most common (to me at least) ways to interact with react in cljs

padraic17:09:16

Anyone know how to use a javascript Buffer in a shadow-cljs browser build? js/Buffer works fine ootb for node builds but I would like to override this for global reference if possible

padraic17:09:37

I have installed [feross/buffer](https://github.com/feross/bufferhttps://github.com/feross/buffer) but requiring it is quite tricky