- Anyway you need to find and note all the places where is
editReferenceField
used. Because you need to test all these places later;
- Then check and note all methods
editReferenceField.???
;
- Create the new functional component below and export all the props from p.2
window.editReferenceField = { someFunc: theFunc, otherFunc: theOtherFunc }
;
- One by one replace and test all components from p.1. If something wrong, use the class component to compare and note the difference, resolve them;
- Finally test all the places from p.1;
- Remove class component.
If it's impossible, then just don't touch it for now.