I learn react and dont understand how to fix this. From this source
I look in the Rule Details for this rule:
Use the spread operator instead of '.apply()'.
But have tried but it's never working to reformate this code to comply with this rule:
renderPages() {
const { pdf, containerWidth, zoom } = this.state;
const { disableVisibilityCheck } = this.props;
if (!pdf) return null;
const pages = Array.apply(null, { length: pdf.numPages });
return pages.map((v, i) => (
<PDFPage
index={i + 1}
key={`pdfPage_${uniqueId()}`}
pdf={pdf}
containerWidth={containerWidth}
zoom={zoom * INCREASE_PERCENTAGE}
disableVisibilityCheck={disableVisibilityCheck}
/>
));
}