Fork me on GitHub
#clojure-uk
<
2020-05-06
>
Jakob Durstberger06:05:39

Good morning 🙂

Jakob Durstberger06:05:22

I don’t know if there are any reagent wizards in here, maybe someone is able to help me out. I’ve been stuck on this for 3 days now :white_frowning_face: https://stackoverflow.com/q/61629092/3286569

dominicm07:05:30

Your use looks wrong.

dominicm07:05:46

Reagent has an as-element function, I'm pretty sure you want that

Jakob Durstberger07:05:08

instead of reactify-component ?

Jakob Durstberger07:05:09

I tried that and it just gives me a different error, that I “Objects are not valid as a React child”

dominicm08:05:12

What did you try exactly? :)

dominicm08:05:42

Hmm. I see. withAuthenticator is a HOC.

Jakob Durstberger09:05:30

I tried

(def root-view
  (reagent/adapt-react-class
    (withAuthenticator
      (reagent/as-component main-panel))))

Jakob Durstberger09:05:21

> I see. withAuthenticator is a HOC. yeah, I understand how they are supposed to work in principle and there even is a guide about them in the reagent docs https://github.com/reagent-project/reagent/blob/master/doc/InteropWithReact.md#example-decorator-higher-order-components

dominicm10:05:02

fwiw, as-component should be used like [main-panel] instead I think. But yeah, I was guessing it was the opposite of what you were trying 😁

Jakob Durstberger10:05:28

I’ll try that out after work, cheers

dominicm10:05:15

I think more of the stacktrace would help debug.

Jakob Durstberger10:05:48

I have no clue what is going on 😄

Ben Hammond09:05:54

grr! does anyone really refactor using using Drag-and-Drop? Why would that ever be a desirable feature?

guy09:05:10

Morning!

👋 16
folcon10:05:45

Refactor using drag and drop?

Ben Hammond11:05:18

yeah its one of those intellij features that turns around to bite you every now and then

folcon12:05:51

Huh, that’s weird

folcon12:05:18

I just know that’s going to trip me up >_<…

mccraigmccraig11:05:52

dragging and dropping sexps, like a gui paredit ? might be quite nice

dominicm11:05:03

That's just been released hasn't in?