Closed
Description
Library complains Avoid direct Node access. Prefer using the methods from Testing Library.
for the following code props.children
:
I want to be able to insert children, or a default node.
return (
<>
{ // Other elements here. }
{'children' in props ? (
props.children
) : (
<MyComponent {...props} disabled={disabled} />
)}
</>
)