mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
* Create our own createHelper, its not in recompose anymore * Use our withStateSelector * Proper apiKey usage * Replace apiKey with bootstrapUrlKeys * No need of true value in html * Use lodash.omit instead in dev * Remove unused file * Remove unnecessary extra folder utils * Upgrade recompose again * Oops! Move lodash.omit to devDependencies * Fix webpack files styles * Make examples bigger in width
27 lines
466 B
JavaScript
27 lines
466 B
JavaScript
import React from 'react';
|
|
|
|
const createEagerElementUtil = (
|
|
hasKey,
|
|
isReferentiallyTransparent,
|
|
type,
|
|
props,
|
|
children
|
|
) => {
|
|
if (!hasKey && isReferentiallyTransparent) {
|
|
if (children) {
|
|
return type({ ...props, children });
|
|
}
|
|
return type(props);
|
|
}
|
|
|
|
const Component = type;
|
|
|
|
if (children) {
|
|
return <Component {...props}>{children}</Component>;
|
|
}
|
|
|
|
return <Component {...props} />;
|
|
};
|
|
|
|
export default createEagerElementUtil;
|