I am using the following library uiwjs/react-json-view, it is the typical library to view json. The issue is that I want it to load a large json. But when it does, it freezes the page in the process. I have already used Suspense and Lazy from react, to load the component, and it does its job. The thing is that it seems that after the component appears, it starts processing the json, causing the page to freeze. Does anyone know what I could do?
My goal is to be able to view a large json without the page freezing in the process.
JavaScript is a single-threaded programming language. JavaScript runs in the main thread. When your component is rendered it starts computing and it seems in your case this JSON viewer is computing in a non optimal way.
To the question “Does anyone know what I could do?” I can suggest you use another library or write the JSON viewer yourself, because uiwjs/react-json-view is obviously written in a non optimal way for large data.
Another posibility would be you are using it in a wrong way.
1