DEV Community

amankumar4all
amankumar4all

Posted on

ReactJs Doubt

hello everyone
I need your help
After getting a successful response from API, I want to change the page/load a new component in the browser but didn't find the correct way to do so.
So please help regarding this.
Example-
axios.post('https://api.staging.goplannr.com/v2/user/otp/generate', this.state)

    .then(response=> {

        console.log(response);

        return(

            <div>

                <OTP/>

                </div>

        )

    }

OTP is my component but in the browser, it is not working and also not showing any response.

Top comments (0)