Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const actionProps = pickBy(
firebaseProps,
prop => typeof prop === 'function'
);
const subscriptionProps = this.state.subscriptionsState;
const props = mergeProps(this.props, {
...actionProps,
...subscriptionProps,
});
return createElement(WrappedComponent, props);
}
}
FirebaseConnect.WrappedComponent = WrappedComponent;
FirebaseConnect.defaultProps = Component.defaultProps;
FirebaseConnect.displayName = `FirebaseConnect(${getDisplayName(WrappedComponent)})`;
FirebaseConnect.contextTypes = FirebaseConnect.propTypes = {
firebaseApp: shape({
database: func.isRequired, // eslint-disable-line react/no-unused-prop-types
}),
};
return FirebaseConnect;
};
};