Fork me on GitHub
#cljsrn
<
2022-03-24
>
hadils10:03:03

Has anyone set up storybook hi with krell? I am having the hardest time getting this to work.

Jonovono14:03:49

That's going to be my next task. Altho I prefer Cosmos (https://github.com/react-cosmos/react-cosmos)

hadils16:03:15

The issue I have is getting my components to work with ClojureScript. I want to avoid Redux and write my business logic in CLJS. I don’t know whether to write JS components inside a CLJS app or CLJD react native components and have them connect to Storybook or Cosmos. Any ideas?

joshmiller16:03:26

@UGNMGFJG3 I know http://vouch.io write plain JS components which are tested in Storybook, then use a CLJS app to direct them and run the business logic

joshmiller16:03:24

If you page back far enough in here, David Nolen explained that writing dumb components in JS boils down to essentially markup and next-to-no logic.

joshmiller16:03:41

I haven’t done this myself, but conceptually it made sense to me.

hadils16:03:14

Thanks @U0E1JV8GK. The best I can tell is that they run them in separate processes rather than integrate them. I’ve been struggling with combining them. I am about to give up and just import JS objects into my CLJS REPL.

joshmiller16:03:17

I think that makes sense. I would consider it the same as importing third-party components that were written in JS.

hadils16:03:36

Thank you @U0E1JV8GK and @U037ENVB11C. This discussion is very helpful.

👍 1
frankitox17:03:15

Anyone found how to 'Disable Fast Refresh' programatically?

frankitox20:03:20

Well, I couldn't find a switch for this so I ended up commenting the reloading code

dima13:03:14

This could also work :

(when-let [DevSettings (.-DevSettings ^js rn/native-modules)]
    (when (.-setHotLoadingEnabled DevSettings)
      ;; It's necessary to toggle the value from on to off in RN 0.63 for
      ;; the change to have an effect
      (.setHotLoadingEnabled ^js DevSettings true)
      (.setHotLoadingEnabled ^js DevSettings false)))

frankitox02:03:52

I'll give it a shot later, but I think I tried that one. Thanks!