Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

120
Visualizações
Why do I have a lot of console output?

I've some drop down lists in my application which I'm filling programmatically, basically it's working fine but when I'm doing some output to console, i've got a lot of repetitive output.

      return (
    <InputGroup className="pdInputGroup">
      <InputGroup.Text className="pdInputGroupText">{props.name}</InputGroup.Text>
      <Dropdown onSelect={handleSelect} align='start'>
        <Dropdown.Toggle className={!!props.isInvalid ? "dropdown-btn dropdownError" : "dropdown-btn"}>{props.preSelection}</Dropdown.Toggle>
        <Dropdown.Menu>
        {
          list.map((item, index) => {
              console.log("item: " + item + " index: " + index);
              return <Dropdown.Item eventKey={index}>{item}</Dropdown.Item>
          })
        }
        </Dropdown.Menu>
      </Dropdown>
    </InputGroup>
  );

The beat is in sync with receipton of information from a websocket, a heartbeat from the backend service if an application is still responsible. The websocket information is not changing anything in this case, when heartbeat tells me that the application is not responsible or heartbeat is missing, a dialog is shown. Nothing more and it has no connection in my point of view of this drop down lists.

The output looks like this:

item: black index: 0 DropDownInput.js:27
item: white index: 1 DropDownInput.js:27
item: yellow index: 2 DropDownInput.js:27
item: green index: 3 DropDownInput.js:27
item: black index: 0 DropDownInput.js:27
item: white index: 1 DropDownInput.js:27
item: yellow index: 2 DropDownInput.js:27
item: green index: 3 DropDownInput.js:27
item: blue index: 4 DropDownInput.js:27
item: black index: 0 DropDownInput.js:27
item: white index: 1 DropDownInput.js:27
item: yellow index: 2 DropDownInput.js:27
item: green index: 3 DropDownInput.js:27
item: black index: 0 DropDownInput.js:27
item: white index: 1 DropDownInput.js:27
item: yellow index: 2 DropDownInput.js:27
item: green index: 3 DropDownInput.js:27
item: blue index: 4 DropDownInput.js:27

The application doesn't seem to have a problem either, or it is not being re-rendered, but I think that the output is not normal.

How can I debug this?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda