Closed
Description
Do you want to request a feature or report a bug?
I want to request a feature.
What is the current behavior?
We have no API to verify a ReactNode is a React 16 Fragment. Though now we can use React.isValidElement(instance) && typeof instance.type === 'symbol'
to distinguish it. It's verbose and seems uncertianly right.
What is the expected behavior?
Add api:
React.isFragment(object)
Verifies the object is a React.Fragment. Returns true or false.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
React 16.2