9 lines
181 B
JavaScript
9 lines
181 B
JavaScript
|
export const getRenderPropValue = propValue => {
|
||
|
if (!propValue) {
|
||
|
return null;
|
||
|
}
|
||
|
if (typeof propValue === 'function') {
|
||
|
return propValue();
|
||
|
}
|
||
|
return propValue;
|
||
|
};
|