SetScale is not working if we set the initial values to the scale
Closed this issue · 1 comments
shaangidwani commented
When we set intial values to the scale ex :
const [scale, setScale] = useState(1);
const { pdfDocument, pdfPage } = usePdf({
file: DataPDFPath,
page,
canvasRef,
scale:1.7
});
Then onClick={() => setScale(scale * 0.9)} is not working.
Can anybody help on this please or any fix?
rspauwen commented
You need to change scale:1.7
to scale
to actually start using the state