You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rum.core/with-key and rum.core/with-ref functions call the underlying React .cloneElement function to create a new React component that includes the supplied key or ref, respectively. Both with-key and with-ref use full function signature version of .cloneElement and pass nil for the optional last argument corresponding to the new component's children. This leads to the resulting component missing the children of the original. If the smaller arity function signature is used omitting the nil, the resulting component will have all of the original component's children.
Is this intended? If so, what is the proper way to use with-key and with-ref so the resulting components also includes the original component's children?
If this was not intended, I have defined these functions as a workaround that works for me:
The
rum.core/with-key
andrum.core/with-ref
functions call the underlying React.cloneElement
function to create a new React component that includes the supplied key or ref, respectively. Both with-key and with-ref use full function signature version of.cloneElement
and passnil
for the optional last argument corresponding to the new component's children. This leads to the resulting component missing the children of the original. If the smaller arity function signature is used omitting thenil
, the resulting component will have all of the original component's children.Is this intended? If so, what is the proper way to use
with-key
andwith-ref
so the resulting components also includes the original component's children?If this was not intended, I have defined these functions as a workaround that works for me:
The text was updated successfully, but these errors were encountered: