diff --git a/README.md b/README.md index 546588075..36e3a6dbc 100644 --- a/README.md +++ b/README.md @@ -206,7 +206,7 @@ Loads a document passed using `file` prop. |className|Class name(s) that will be added to rendered element along with the default `react-pdf__Document`.|n/a|| |error|What the component should display in case of an error.|`"Failed to load PDF file."`|| |externalLinkTarget|Link target for external links rendered in annotations.|unset, which means that default behavior will be used|One of valid [values for `target` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#Attributes). -|file|What PDF should be displayed.
Its value can be an URL, a file (imported using `import ... from ...` or from file input form element), or an object with parameters (`url` - URL; `data` - data, preferably Uint8Array; `range` - PDFDataRangeTransport; `httpHeaders` - custom request headers, e.g. for authorization), `withCredentials` - a boolean to indicate whether or not to include cookies in the request (defaults to `false`).|n/a|| +|file|What PDF should be displayed.
Its value can be an URL, a file (imported using `import ... from ...` or from file input form element), or an object with parameters (`url` - URL; `data` - data, preferably Uint8Array; `range` - PDFDataRangeTransport; `httpHeaders` - custom request headers, e.g. for authorization), `withCredentials` - a boolean to indicate whether or not to include cookies in the request (defaults to `false`).
**Warning**: Since equality check (`===`) is used to determine if `file` object has changed, it must be memoized by setting it in component's state, `useMemo` or other similar technique.|n/a|| |inputRef|A function that behaves like ref, but it's passed to main `
` rendered by `` component.|n/a|`(ref) => { this.myDocument = ref; }`| |loading|What the component should display while loading.|`"Loading PDF…"`|| |noData|What the component should display in case of no data.|`"No PDF file specified."`||