Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

110
Vistas
Does React Re render All Ui elements when Data/State Change?

i am working on a project in which i am using a socket.io for real time data streaming.I have front end in react.My app component structure looks like this

<App>
    <Circle />
    <Component./>
    <........./>
</App>

my app component is receiving data over socket.io and passing it to child component .Like this

        <CircleC dataS={dataS}  dataC={dataC}/>
  • dataS is 10000 length array
  • dataC is also 10000 length array

and these array also changes after 100milisecond.mean i am receiving 2 arrays of 10000 records after every 100 millisecond in real time.
This is my Circle Component

return (
<div className="show-data" onWheel={onWheelHandler}>
{
   
    dataS.map((item,id)=>(

        <button className="wave-circle" style={{ backgroundColor: "grey",padding:pad }} key={id}>{id}</button>
        :    dataC[id]==1?
        <button className="wave-circle" style={{ backgroundColor: "green",padding:pad }} key={id}>{id}</button>
        :    dataC[id]==2?
        <button className="wave-circle" style={{ backgroundColor: "yellow",padding:pad }} key={id}>{id}</button>
        :    spike[id]==3?
        <button className="wave-circle" style={{ backgroundColor: "cyan",padding:pad }} key={id}>{id}</button>
        :       <button className="wave-circle" style={{ backgroundColor: "purple",padding:pad }} key={id}>{count}</button>
    
        ))

. Problems i am facing.

  • Every time data Changes/new data arrives.All the UI Elements(circle html) redraw again(i think so). -What we can do to avoid re-drawing of UI .only data within these elements should be display i ONLY WANT TO know how we can draw UI only one time and then when new data arrives only content or styling change .Cicrle or UI should not be redrawn.
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda