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
I need to clean up some of the architecture. Right now some "pages" handle no logic and all the logic, event handing, etc. occur in the components. For example, the Catalog page has a CatalogViewer. The CatalogViewer handles event updates to State and such things. This forced me to create a second component for ProjectCatalogViewer which is very similar to the CatalogViewer. But then I have a MetadataView page that handles the event logic and passes a Metadata to a MetadataDetails component.
I'm not being consistent with the way I implement logic
I think a better way to deal with this might be for the page to handle updating states and passing that along to the component? This will also allow the CatalogViewer and VariableViewer to reference the same underlining List<Metadata> instead of each having to create a subset of the list (in case of Project-specific or Zone-specific pages)
Proposal: Rewrite CatalogViewer and VariableViewer to only iterate on a List<Metadata> (the variable viewer will still need to create a List<CatalogVariableViewerViewModel> from the List<Metadata>)
The text was updated successfully, but these errors were encountered:
I need to clean up some of the architecture. Right now some "pages" handle no logic and all the logic, event handing, etc. occur in the components. For example, the
Catalog
page has aCatalogViewer
. TheCatalogViewer
handles event updates to State and such things. This forced me to create a second component forProjectCatalogViewer
which is very similar to theCatalogViewer
. But then I have aMetadataView
page that handles the event logic and passes aMetadata
to aMetadataDetails
component.I'm not being consistent with the way I implement logic
I think a better way to deal with this might be for the page to handle updating states and passing that along to the component? This will also allow the
CatalogViewer
andVariableViewer
to reference the same underliningList<Metadata>
instead of each having to create a subset of the list (in case of Project-specific or Zone-specific pages)Proposal: Rewrite
CatalogViewer
andVariableViewer
to only iterate on aList<Metadata>
(the variable viewer will still need to create aList<CatalogVariableViewerViewModel>
from theList<Metadata
>)The text was updated successfully, but these errors were encountered: