Skip to content

usePDF hook incompatibility on 3.1.12 release #2333

@pitmullerIngka

Description

@pitmullerIngka

Describe the bug
We update patches automatically in our projects, since we expect them to be backwards compatible and not require us to do manual changes.
However, #2247 was released as a patch, even though it requires users of the previous usePDF hook manual changes that are not mentioned anywhere.

To Reproduce
Previous usage (based on test in #2247):

# const [instance, updateInstance] = usePDF(
-   { document: doc }
# );
# useEffect(
-   updateInstance,
#   [doc]
# );

New usage:

# const [instance, updateInstance] = usePDF(
+ 
# );
# useEffect(
+   () => updateInstance(doc),
#   [doc]
# );

Expected behavior
Backwards compatibility on a patch or release as a minor or even major version, which mentions required changes for affected users.

Desktop (please complete the following information):

  • OS: Linux
  • Browser firefox, chromium
  • React-pdf version v3.1.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions