In my code I want to update bboxes array at a later stage after pdf has already rendered, but doing so doesn't create or render any bbox on PDF. Any solution here?
reproducible by adding setTimeout while updating bbox in onLoadSuccess callback
const onLoadSuccess = useCallback(
(document) => {
setNumPages(document.numPages);
setTimeout(() => {setBboxes(...)}, 6000);
},
[ setNumPages]
);