Z
Z
zertain2020-09-08 12:01:17
React
zertain, 2020-09-08 12:01:17

How to remove React from a page?

Good day to all.

I set myself the task of embedding Element chat on the site, in the form of an embeddable container.
Ifram'e did not fit, as it cuts off part of the content inside, etc.

The first time the initialization goes well, but when you go to other pages (a site with dynamic content update), there is a need to re-initialize.
Actually, this is the question, is it possible to somehow reset the state / cache of React'a (I assume that this is the problem), or even remove it from the page in order to reload it?

I provide the error log:
5f5747abaa7b0096905510.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2020-09-08
@Robur

Reset "react itself" - add an id to the root component and change it to a new one when changing the page. It will unmount and mount again. And then the details already depend on what you have screwed up there. State it is not only stored in the components.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question