react-native-big-list
Version:
High-performance, virtualized list for React Native. Efficiently renders large datasets with recycler API for smooth scrolling and low memory usage. Ideal for fast, scalable, customizable lists on Android, iOS, and web.
38 lines • 1.12 kB
JavaScript
import React, { memo } from "react";
import PropTypes from "prop-types";
import { Animated, Image } from "react-native";
import { createElement, mergeViewStyle } from "./utils";
const BigListPlaceholder = _ref => {
let {
component,
image,
style,
height,
width = "100%"
} = _ref;
const bgStyles = {
position: "absolute",
resizeMode: "repeat",
overflow: "visible",
backfaceVisibility: "visible",
flex: 1,
height: "100%",
width: "100%"
};
return /*#__PURE__*/React.createElement(Animated.View, {
style: mergeViewStyle(style, {
height,
width
})
}, createElement(component) || /*#__PURE__*/React.createElement(Image, {
source: image || require("./assets/placeholder.png"),
style: bgStyles
}));
};
BigListPlaceholder.propTypes = {
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
};
export default /*#__PURE__*/memo(BigListPlaceholder);
//# sourceMappingURL=BigListPlaceholder.js.map