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
When a renderProp function renders a string or null I see the following react warning being logged at stdout:
Warning: Failed prop type: The prop `children` is marked as required in `SimpleSFCWrapper`, but its value is `null`.
in SimpleSFCWrapper
Same for a string:
Warning: Failed prop type: Invalid prop `children` of type `string` supplied to `SimpleSFCWrapper`, expected a single ReactElement.
in SimpleSFCWrapper
Expected behavior
I wouldn’t expect to see such a warning since everything works just fine when using null or string values.
Your environment
I’ve created a minimal example to reproduce this issue:
run npm i react@16.8.3 enzyme@3.9.0 enzyme-adapter-react-16@1.10.0 react-dom@16.8.3
create a file test.js which the following content:
I’ve just noticed this has been only fixed partially.
With enzyme-adapter-react-16@1.11.2 I still get the following warning when returning null from a renderProp.
Warning: Failed prop type: The prop `children` is marked as required in `SimpleSFCWrapper`, but its value is `null`.
in SimpleSFCWrapper
Current behavior
When a
renderProp
function renders astring
ornull
I see the following react warning being logged at stdout:Same for a
string
:Expected behavior
I wouldn’t expect to see such a warning since everything works just fine when using
null
orstring
values.Your environment
I’ve created a minimal example to reproduce this issue:
npm i react@16.8.3 enzyme@3.9.0 enzyme-adapter-react-16@1.10.0 react-dom@16.8.3
test.js
which the following content:node test.js
API
Version
Adapter
The text was updated successfully, but these errors were encountered: