Content disappeared when render.
Opened this issue · 5 comments
shahariar50 commented
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.
anbu-securra commented
Facing the same issue. Please update if you got any leads.
anbu-securra commented
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.
blackhill commented
@shahariar50 @anbu-securra Did you find a workaround? Thanks
shahariar50 commented
@blackhill Not yet
blackhill commented
@shahariar50 I used a Memo to rerender the component only if the docs are changed. This worked for me.