-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
None
root/static/scripts/edit/externalLinks.js is written as a class-based component with its own state, while sub-components URLInputPopover and ExternalLinkAttributeDialog also have their own state – this requires hacks like having to update the local relationship state inside ExternalLinkAttributeDialog via useEffect.
All state should be stored in the top-level ExternalLinksEditor; sub-components should receive their "state" as props. ExternalLinksEditor should be converted to a functional (not class-based) component with its own top-level reducer.