Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

prop type for ref in react js

refProp: PropTypes.oneOfType([
    // Either a function
    PropTypes.func, 
    // Or the instance of a DOM native element (see the note about SSR)
    PropTypes.shape({ current: PropTypes.instanceOf(Element) })
])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #prop #type #ref #react #js
ADD COMMENT
Topic
Name
2+1 =