-
Notifications
You must be signed in to change notification settings - Fork 750
Closed
Description
I've probably completely overlooked something but how to I render children? In a stand alone front end app I'd write something like this -
var App = React.createClass({
render: function() {
return (
<Polyselect ref="polyselect">
<Polyoption title="My select option" value="1" />
<Polyoption title="My second select option" value="2" />
<Polyoption title="My third select option" value="3" />
</Polyselect>
);
}
});
React.render(<App/>, document.body);
How do I write this with react rails? I imagine it would be like this -
react_component('Polyselect', { ref: 'polyselect' }, [
react_component('Polyoption', { title: 'My select option', value: '1' })
])
I think I'm missing something fundamental here. Help would be much appreciated!
Metadata
Metadata
Assignees
Labels
No labels