cljsrn

hadils 2022-03-24T10:43:03.031769Z

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

Jonovono 2022-03-24T14:52:49.669239Z

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

hadils 2022-03-24T16:27:15.389689Z

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?

joshmiller 2022-03-24T16:43:26.195709Z

@hadilsabbagh18 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

joshmiller 2022-03-24T16:44:24.943589Z

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.

joshmiller 2022-03-24T16:44:41.857009Z

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

hadils 2022-03-24T16:45:14.055219Z

Thanks @joshmiller. 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.

joshmiller 2022-03-24T16:46:17.532819Z

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

hadils 2022-03-24T16:47:36.532589Z

Thank you @joshmiller and @jordan698. This discussion is very helpful.

👍 1
frankitox 2022-03-24T17:43:15.806739Z

Anyone found how to 'Disable Fast Refresh' programatically?

frankitox 2022-03-24T20:09:20.438359Z

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

dmitryn 2022-03-28T13:22:14.919689Z

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)))

frankitox 2022-03-31T02:20:52.355699Z

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