Custom components may cause memory leak.[BUG]
Environment
"formiojs": "^4.0.0-rc.21", "react": "16.8.2", "react-formio": "^4.2.6",
Steps to Reproduce
Run official example(https://github.com/formio/react-app-starterkit) and go into #/form/create, drag and Drop React example compoennt, and then open react dev tools, we can see there are three Example components. Click save to close edit dialog, there are tow components left. Then remove the Example components in form, we can see there are still a Example components in react dev tools. I think it may be a react dev tools bug at first, but after I take many memory snapshots for comparison which shows a lot increase of example components I think it may be a bug of form.io.
Example
https://github.com/formio/react-app-starterkit
Is this because the component isn't detaching correctly?
Is this because the component isn't detaching correctly?
I don't know, I don't have enough time to trace this bug. It seems detaching correctly and not correctly, because when close field edit dialog, example components decrease from 3 to 2, but is expected one example component left. I think the problem is when added a example component and open edit dialog, there are three component exists in react dev tools which suppose to be two. Form.io create an extra example component which size is NANpx * NANpx and it out of control.
@GapMAX, we would need to investigate this a part of a support package in order to figure out what is going on. Please contact [email protected] if you are interested.
Thank you.
I am closing the issue as it was created too long ago and there are no new comments here. I hope it was resolved. If not, please reopen it. Thanks!