How does react enable tag to switch pages and maintain the previous state?

as shown in the figure, the access address is http://blog.gdfengshuo.com/ex...

.

how can react switch pages similar to tag, and still maintain the original state of the old page when switching back to the previous page?

Jul.02,2022

the original page hidden drops out the new page show?
render () {
const {index} = this.state;
return ([

)
<A isShow={index == 0} />,
<B isShow={index == 1} />,
<C isShow={index == 2} />

])
}


I see you have fixed the page state maintenance in your example. How do you do it? Can you share your thoughts and thank you


have you solved it?

Menu