This will output something like this:
<[object Object]
loading
size="large"
>
PrimaryButton
</[object Object]>
This is likely and issue with react component to jsx string. See advanced usage with forward ref to try and solve the problem: https://reactjs.org/docs/forwarding-refs.html#displaying-a-custom-name-in-devtools