Forum

change text input's value

This thread contains 1 reply, has 2 voices, and was last updated by Aajit Shah 4 years, 4 months ago.

  • Author Replies
    • #63908

      How do we change text input’s value in react native


    • #63909

      If you do not want to use setState means you do not want your component to render. But how do you expect to see a visible change of the value in the text input without re rendering of the component. React re-renders the parts of the component and not the entire component. So I think you don’t have to worry about re rendering of the component.

      If you still don’t want to use setState, you can change the date in the text input using this.state.somepropertyname and use this.forceUpdate() when you are done with the changes and want your component to re render. But have to warn you that using forceUpdate is discouraged and use only when it is absolutely required.


Viewing 1 reply thread

You must be to reply to this thread.Please or . Registration is 100% free.

GET FREE CONSULTATION

Call Us Now For Free Consultation97370 05566

Our experts listen to you patiently and suggest you the right course after conducting a personality profile test. Register your interest below to schedule personality profile test for you.

SUBSCRIBE TO OUR NEWSLETTER

Copyright 2016-2024 Smart Mentors. All Rights Reserved.

Login

FORGOT PASSWORD

Sign up now to Become An Instructor

    Register your Interest

      cf7captchaRegenerate Captcha