@wordpress/components
Version:
UI components for WordPress.
33 lines (30 loc) • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.OPTIMIZATION_PROPS = exports.OPTIMIZATION_ITEMS_THRESHOLD = void 0;
/**
* Optimization properties for FlatList.
* @typedef {Object} OptimizationProps
* @property {number} maxToRenderPerBatch - Controls the amount of items rendered per batch during scrolling.
* Increasing this number reduces visual blank areas but may affect responsiveness.
* Default: 10
* @property {number} windowSize - Measurement unit representing viewport height.
* Default: 21 (10 viewports above, 10 below, and 1 in between).
* Larger values reduce chances of seeing blank spaces while scrolling but increase memory consumption.
* Smaller values save memory but increase chances of seeing blank areas.
*/
/**
* Threshold for applying optimization settings.
* @type {number}
*/
const OPTIMIZATION_ITEMS_THRESHOLD = exports.OPTIMIZATION_ITEMS_THRESHOLD = 30;
/**
* Optimization properties for FlatList.
* @type {OptimizationProps}
*/
const OPTIMIZATION_PROPS = exports.OPTIMIZATION_PROPS = {
maxToRenderPerBatch: 15,
windowSize: 17
};
//# sourceMappingURL=shared.native.js.map