I'm using react_rails to render react components inside of a slim template in a Ruby on Rails application. Is there a way to pass children to a React component, where the children are rendered server-side in slim?
Here is what I would ideally like to have:
<MyComponent>
<p>my custom content</p>
</MyComponent>
Where the content comes from the template itself, something like this:
= react_component 'MyComponent' do
p my custom content
Is this possible? If so what's the best way to pass children to a react_component?