P
P
pink2floyd2019-07-11 12:06:04
React
pink2floyd, 2019-07-11 12:06:04

How to shutdown a React component?

I have an App component that started another Login component and now I want to terminate the Login component and return to the App. How to do it ?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Anton Spirin, 2019-07-11
@pink2floyd

I already wrote to you about routing. See this example .
If you are sure that you do not need routing, then use conditional rendering .

R
Robur, 2019-07-11
@Robur

unmount it by re-rendering the parent component without Login.

W
WizardW, 2019-07-11
@WizardW

Go to the App, do the necessary work and at the end of the handler or in any other place do history.push('/somewhere')

A
Ankhena, 2017-10-05
@Kuper132

First input, then slides and label.
And some must be on the same level for adjacent selectors to work ~

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question