Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 544 Bytes

getvalidprops.md

File metadata and controls

33 lines (22 loc) · 544 Bytes

getValidProps

Filters out and returns valid React-safe props.

Arguments

Argument Type Description
props Object An prop-object of key-value pairs.

Returns

Object: Filtered React-safe props.

Alias

restProps(props)

Examples

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} />}
  }
}