How to use the elementType function from prop-types

Find comprehensive JavaScript prop-types.elementType code examples handpicked from public code repositorys.

93
94
95
96
97
98
99
100
101
102
    className: PropTypes.string,
    onPathNotMatch: PropTypes.func,
    viewsConfig: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.exact({
        regexp: PropTypes.instanceOf(RegExp).isRequired,
        urlParamsNames: PropTypes.arrayOf(PropTypes.string).isRequired,
        component: PropTypes.elementType.isRequired
    }))).isRequired
};

module.exports = Router;
fork icon129
star icon502
watch icon31

36
37
38
39
40
41
42
43
44
module.exports.propTypes = {
    middleEnd: T.shape({
        store: T.object.isRequired
    }).isRequired,
    theme: T.object,
    Router: T.elementType
};

module.exports = HotLoader.hot(module.exports);
fork icon7
star icon35
watch icon13

+ 3 other calls in file