VnoitKumar
VnoitKumar

Reputation: 1426

Need to Render 100k+ list at a time React

When we render all the list at a time the browser is getting lagged

We are trying to render a chart with 100k+ item in an array, where all the items in the array should display in the chart.

Is there is any best way to do it in React

Upvotes: 0

Views: 665

Answers (2)

Praveen Rao Chavan.G
Praveen Rao Chavan.G

Reputation: 2860

Consider using Lazy loading like https://github.com/bvaughn/react-virtualized

but don't recommend showing such a huge set of data at once, what you can do is to have pagination, both client-side and server-side pagination.

for a line chart with huge data set, please consider using canvasjs https://canvasjs.com/react-charts/performance-demo-chart/

Upvotes: 4

Alex Ilyin
Alex Ilyin

Reputation: 1304

Use react virtual list, it will render only visible items. https://github.com/bvaughn/react-virtualized

Upvotes: 0

Related Questions