Alcumus/react-doc-viewer

Content disappeared when render.

Opened this issue · 5 comments

I am working on a react project where I have been trying to preview the different types of files from the different link and when the link changes, the app renders and the preview disappears.

Facing the same issue. Please update if you got any leads.

image

File: https://github.com/Alcumus/react-doc-viewer/blob/master/src/components/ProxyRenderer.tsx

CurrentRenderer variable is undefined and because of that null value is being returned and it turns out to be replacing the old content with null value ie. the preview disappears.

@shahariar50 @anbu-securra Did you find a workaround? Thanks

@shahariar50 I used a Memo to rerender the component only if the docs are changed. This worked for me.