Fork me on GitHub
#rum
<
2018-07-25
>
euccastro00:07:27

wherever a React function expects you to pass in a React element (like in the case of HandleSpan and HashtagSpan in the example here: https://draftjs.org/docs/advanced-topics-decorators.html), how would you do that if you want to pass in components defined in rum (i.e., with rum/defc et al)?

euccastro00:07:19

I know you can get the React component from a rum component given the state of the latter (i.e., with :rum/react-component), but how do I get it if I'm creating the component to return to another function?

euccastro02:07:16

nevermind, I found out that the element is the return value of the function that (rum/defc my-comp ...) generates and binds to my-comp. the only other caveat is that to interop with native React APIs you may have to deal with props objects instead of cljs arg vectors