Follow-up from "Add Components for Editing and Creating User Lists"
The following discussion from !37012 (merged) should be addressed:
-
@pslaughter started a discussion: (+3 comments) suggestion: There's a bit of duplication between these two views which would be nice to encapsulate:
- The error list presentation and store binding
- The title utility classes
Have we considered introducing a
_layout
component to encapsulate some of this? Here's a patch for what I'm suggesting:0001-Encapsulate-user-list-page-layout-with-component.patch
It'd be nice to preserve the look and feel of these very-similar-but-slightly-different pages and pure presentational components can help with this. Some thoughts on this patch:
- You'll notice that the
_layout
component can be a functional component. - Passing
errorMessage
as prop revealed that there's some type inconsistencies with how we handleerrorMessage
in state. For instance, it's initialized as''
but we really expect it to be an array.
Could you please review this patch and let me know what you think? Feel free to make any changes you see fit
😄