studieredcorn / STEMiO

0 stars 0 forks source link

Make selection-info-component and popup-component more idiomatic React code #8

Open mlepilov opened 7 years ago

mlepilov commented 7 years ago

Currently, selection-info-component stores DOM objects outside of state variables, which goes against the React philosophy; for example, if selection-info-component had child components, and the DOM tree changed (which currently happens to coincide with re-rendering of selection-info-component, but this is not necessarily the case), it would not trigger a re-rendering of the child component.

Within popup-component, we are changing an uncontrolled component to a controlled component, which React warns us against.

mlepilov commented 7 years ago

This is of moderate difficulty. It will require a bunch of time and refactoring.