image icon indicating copy to clipboard operation
image copied to clipboard

Editor Auto reload

Open SsadiqRoy opened this issue 4 years ago • 2 comments

After uploading the image to the backend the whole page automatically re loads itself. The Images is uploaded and is in the directory. any idea why the page reloads

SsadiqRoy avatar Oct 07 '21 23:10 SsadiqRoy

What programming language did you use?

In my case, when I'm using Javascript and Reactjs, you just need to put the editor into useEffect function, so it called only once when the web is rendered. But it was still going to reload and add a new editor section if you save the file because if you save the file in react it automatically re-renders the pages and make the editor got reloaded.

Hope it helps.

edricgalentino avatar Apr 23 '22 03:04 edricgalentino

I had the same issue, and in my case, the reason why it reloaded is that I had in the useEffect dependency array a variable that did change on every render. Removing the variable from the dependency array does the trick.

iamladi avatar Dec 06 '22 08:12 iamladi