You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are parts of the component that work, but that I don't particularly like.
The biggest issue is that we use effect hooks throughout because the component never technically unmounts when switching between input types and/or parameters. This makes it very easy to create unforeseen bugs, and also makes state management challenging. For example, there's a point in the default input method where an effect hook is partly meant to essentially prevent the behavior of the main ParameterEditor component's own effect hook, which is necessary for yearly and date-based inputs.
There's probably a way to redo this so that state management is clearer and effect hooks are minimized. I'd theorize we'd need at least one, meant to update values when a reform already exists, but that should really be the max. I think we have like 7 in there.
The text was updated successfully, but these errors were encountered:
There are parts of the component that work, but that I don't particularly like.
The biggest issue is that we use effect hooks throughout because the component never technically unmounts when switching between input types and/or parameters. This makes it very easy to create unforeseen bugs, and also makes state management challenging. For example, there's a point in the default input method where an effect hook is partly meant to essentially prevent the behavior of the main
ParameterEditor
component's own effect hook, which is necessary for yearly and date-based inputs.There's probably a way to redo this so that state management is clearer and effect hooks are minimized. I'd theorize we'd need at least one, meant to update values when a reform already exists, but that should really be the max. I think we have like 7 in there.
The text was updated successfully, but these errors were encountered: