Fork me on GitHub
#rum
<
2018-09-27
>
tyler18:09:27

Is there a way to use react higher-order component functions with rum? I've been trying to use https://aws-amplify.github.io/amplify-js/media/authentication_guide#using-components-in-react but I haven't figured out a way to get the wrapped rum component to mount.

stephenmhopper18:09:40

Is it possible to define a component with rum/defc that returns sibling nodes (i.e. [[:tr "row1"] [:tr "row2"]]) instead of a single root node?

serioga21:09:44

Yes, just use list([:tr] ...).

stephenmhopper22:10:53

@U0HJNJWJH I tried using (list [:tr] [:tr]) but that’s producing the same error about returning an invalid react component. Were you referencing a different list operator?

serioga22:10:39

Please show your code and error message

stephenmhopper22:10:50

Oh hey, I figured it out. The project I’m working on was apparently still using Rum 10.8 and React 15. Support for this wasn’t added until React 16. Upgrading the project resolved the issue. Thank you for your help!