Fork me on GitHub
#reagent
<
2019-06-13
>
caleb.macdonaldblack04:06:26

How can I get a reference to a component created with (r/adapt-react-class)?

caleb.macdonaldblack04:06:35

getting ref doesn't seem to work

caleb.macdonaldblack04:06:36

I'm trying to do (r/set-state this new-state) in a function passed into the props of the component but I can't figure out how to access this

tavistock13:06:37

this-as maybe

lilactown04:06:21

I think there’s an (r/current-component) function you can call

caleb.macdonaldblack05:06:46

@lilactown Nah that doesn't work in any functions I pass into the props of a third party component.

Ahmed Hassan17:06:36

What is purpose of :<> in the reagent?

pcj17:06:51

So you can do something like this:

[:<>
  [:div]
  [:div]
]
Without surrounding the 2 :divs with a dom element

Ahmed Hassan17:06:28

What would it return?

stefan17:06:15

it returns a react fragment

Ahmed Hassan18:06:25

A common pattern in React is for a component to return multiple elements. Fragments let you group a list of children without adding extra nodes to the DOM.

Ahmed Hassan18:06:10

Is there any similar library to Antizer for Ant Design Mobile?