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

168
Visualizações
Forcefully update the component on updated value inside the render method react native

I am trying to forcefully rerender the complete component on value change inside the render function. Below is a sample code to explain my problem. Profile component I am calling after the login and it's called and two functions inside this getting called and the value is set in the state. Now I am on another screen where I am updating mssidnNumber inside the context and that change I can see in the Profile render() function val. let val = this.context.mssidnNumber; and this val value will change on condition so on this basis I am trying to rerender the complete Profile component again so all values will update. How can I do this please help? Is that possible?

    import React, { Component } from 'react';
    import { View} from 'react-native';
    
    class Profile extends Component {
      constructor(props) {
        super(props);
    
      }
      async componentDidMount() {
      this.Profilefunction();
      }
      
      Profilefunction = () =>{
      
      this.setState({})
      await this.profile2fucntion();
      }
      
      profile2fucntion =() => {
      }
    
      render() {
      let val = this.context.mssidnNumber;
        return (
          <View>
    
          </View>
        );
      }
    }
    
    export default Profile;
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