Documentation website crash after some click
Closed this issue · 4 comments
Error message: Error: Destroying editor before instantiation
Reproduction step:
- Go to https://dzoukr.github.io/Feliz.Quill/#/
- Click on Installation
- Click on Quickstart
- Click on Toolbars
- Click on Themes
- Click on Toolbars
- Click on Quickstart
This order seems to make it crash all the time.
You can also click around 7-10 times on different menu and it seems to reproduce the error too.
Yup, working on it. It has something to do with component lifecycle and fact that number of components differs between pages. But not sure really.
Ok guys - @MangelMaxime, @Zaid-Ajaj - calling for help. What I missed in implementation that these components shares the value instead of having unique when paging?
Hum it remind me of a problem I had on one of my application.
If the DOM between 2 pages is "similar" it is possible that React decide to not destroy the DOM but reuse all or part of the DOM/Components. You can try to force/help React tree diffing by using a prop.key
with a unique name per page.
I don't know if you will need it at the "root" of the pages or if adding it at the "Quill" component will be enough in your case.
Ufff, thanks for all the help! Fixed now.