import React from 'react'; import styles from './styles.scss'; export const hiddenMethods = [ 'UNSAFE_componentWillMount', 'UNSAFE_componentWillReceiveProps', 'UNSAFE_componentWillUpdate', 'componentDidCatch', 'componentDidMount', 'componentDidUpdate', 'componentWillUnmount', 'constructor', 'forceUpdate', 'getDerivedStateFromError', 'getDerivedStateFromProps', 'getSnapshotBeforeUpdate', 'render', 'setState', 'shouldComponentUpdate', ]; export const MethodsTable = ({ methods = [] }) => ( {methods .filter(({ name }) => !hiddenMethods.includes(name)) .map(({ name = '', params = [], description = '' }) => ( ))}
Name Parameters Description
{name} {params.map(({ name: paramName }) => paramName).join(', ')} {description}
);