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

124
Visualizações
useSelector dosen't seem to be updated immediately due to reducer state changing

I have a structure(nested object) that exists in the attached image and if I want to change the value of info‍‍[1] and assign it to info state into the related reducer, but it doesn't update immediately and I think a deep comparison between the previous state and current value didn't occur.

Someone suggested the immutable js but I don't how to use it. honestly, I've converted assigning a value(the assigned value to info state after triggering action) to List imported from immutable js because of changing the reference address of the prev state and new value but I didn't get the result.

enter image description here

I prepared a sandbox for it: enter link description here

I expect when I select the cells then push the increase button, selected cells increase one unit increase immediately but it doesn't happen and you must refresh the window to see the changes.

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