Issue 1:
Feature request: Fill name attribute or add static toString() method for all PropTypes.

For example:

const StringPropType = PropTypes.string;
expect(StringPropType.name).toEqual('checkType: String');

const ArrayOfBoolType = PropTypes.arrayOf(PropTypes.bool);
expect(ArrayOfBoolType.name).toEqual('bound checkType: Array of Bool');

const ShapeType = PropTypes.shape({
foo: PropTypes.bool,
bar: PropTypes.number
});
expect(ShapeType.name).toEqual('bound checkType: Shape of foo:Bool, bar:Number'

It maybe useful when debugging.

In my case - I need to equal components prop types and throw exception if there are same props. So if generate names for prop types - they could be compared.

Current behaviour

Only primitive types could be compared (string, bool, number).

Complex types (shape, arrayOf) - each time returns new bound function. So it could not be compared by value.

Problems with custom prop types

Will generate "undefined" name for custom prop like this:

customProp: function(props, propName, componentName) {
if (!/matchme/.test(props[propName])) {
return new Error(
'Invalid prop `' + propName + '` supplied to' +
' `' + componentName + '`. Validation failed.'
);
}
},

but it fixed by adding function name:

customProp: function customProp(props, propName, componentName) {

btw. Same feature implemented at tcomb lib

Issue 2:
Describe what you were doing when the bug occurred:

I was using profiler to check the performance of my react app, and when i recorded one session, and clicked on close button, got this exception.

Please do not remove the text below this line

DevTools version: 4.12.2-d14b6a4bdd

Call stack: at updateTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:20849:21)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:20694:26)

at ProfilingCache_ProfilingCache.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:21268:11)

at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:38408:33)

at Rh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13414:7)

at Ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14115:7)

at vk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16899:86)

at uk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16419:11)

at rk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16411:23)

at jk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:16395:5)

Component stack: at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:38391:34)

at div

at div

at div

at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:29445:3)

at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40189:34)

at ErrorBoundary_ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33091:5)

at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33171:5)

at div

at div

at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:37210:3)

at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:25673:3)

at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26287:3)

at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33314:3)

at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40585:3)