Filters out and returns valid React-safe props.
Argument | Type | Description |
---|---|---|
props |
Object |
An prop-object of key-value pairs. |
Object
: Filtered React-safe props.
restProps(props)
import React from 'react'
import getValidProps from '@helpscout/react-utils/dist/getValidProps'
class UncleRico extends React.Component {
...
render () {
const rest = {getValidProps(this.props)}
return (<div {...rest} />}
}
}