Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ExcludeProps(Component: any, filter: string[] = []) {
- return (props) => {
- const keys = Object.keys(props).filter(key => !filter.includes(key))
- const picked = lodash.pick(props, keys)
- return <Component {...picked} />
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement