Fork me on GitHub
#cljsrn
<
2016-01-10
>
dvcrn06:01:58

poking around with reagent right now. How can I pass a component as a property to something?

dvcrn06:01:16

or - how can I render a component inline so I can just pass it as a argument around

dvcrn06:01:32

React.renderToString doesn’t seem to be available on rn

dvcrn06:01:44

title: 'More Info...',
        rightCalloutView: (
          <TouchableOpacity
            onPress={() => {
              alert('You Are Here');
            }}>
            <Image
              style={{width:30, height:30}}
              source={require('image!uie_thumb_selected')}
            />
          </TouchableOpacity>
for example

drapanjanas08:01:53

@dvcrn: In a web app I have passed content component like this {:id :groups :label "Groups" :content #'groups-tab} groups-tab is a normal component.

drapanjanas08:01:15

Usage of it looks like:

(let [content-component (:content tab)]
    [:div.tab-content
     [content-component]])

dvcrn10:01:21

@drapanjanas: thanks I'll try that!

mfikes23:01:11

Congrats @artemyarulin — featured in React Native newsletter (cross-platform template work)!

donmullen23:01:42

+:thumbsup: In Highlights from the Community : http://brentvatne.ca/react-native-newsletter/