cyntler / cyntler/react-doc-viewer

`mainState` prop on a DOM element.

Open
#214 4 comments 10 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
481
Forks
147
PR merge metrics
No merged PRs in 30d

Description

On initial loading of an image / pdf / ...
**Warning:** React does not recognize the `mainState` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `mainstate` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

It seems to be related to this code:
const ImageProxyRenderer: DocRenderer = (props) => {
const {
mainState: { currentDocument },
children,
} = props;

if (!currentDocument) return null;

return (

{children || (

)}

);
};
Where passinng mainstate to styledcomponents (container & img) is not allowed.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.