Fork me on GitHub
#reagent
<
2019-08-27
>
Aklscc07:08:29

Hi, I have used reagent for several weeks, but sometimes I really don't know which one to use. - r/as-element - r/reactify-component What's the difference of them? I have read all docs for reagent, but can't make clear about it. Thanks in advanced

4
Lone Ranger10:08:31

they do different things.... IIRC, as-element takes is react->reagent, where reactify-component is reagent->react

Lone Ranger10:08:45

but your goal should be working in reagent as much as possible

Aklscc10:08:12

But as I know, the adapt-react-class woks for react->reagent.

Lone Ranger10:08:15

The whole tutorial series is really good

Aklscc10:08:31

Yes, I have do it. It's really a good doc for reagent learner. But it's little specifier for difference between as-element and reactify-component.

pcj22:09:36

Sorry if this has been answered but reactify-component takes a function whereas as-element takes a hiccup vector. Both can be used with create-element and are good for when you are interoping with react components like material-ui

Aklscc05:09:05

@U5G1JGRMK Thank you firstly. It's a perfect answer.

Lone Ranger10:08:15

deps.edn and #tools-deps works perfectly fine too with NPM and fighweel-main, jus-sayin