-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor <Gallery> and <Editor> into containers and presentational components #179
Comments
@flamerohr @unclecheese Do you think this is the next most important cleanup activity to work on after Chris' work on "Cleanup React Conventions" (silverstripe/silverstripe-framework#6427)? What React code patterns are giving us the most grief in practice? I'm keen to sort out containers vs. components so we can create a pattern library that's not dependant on Redux/GraphQL and other plumbing, but that's broader (and more shallow) than this cleanup task. |
Yes, I think so :) Probably outside the scope of this work: |
Agreed. My biggest concerns are:
|
This would be solved by more widespread use of GraphQL, right? The fact that form submissions aren't using GraphQL seems to be at the root of this issue. @unclecheese Can you please write up a ticket or two about your proposed improvements? Something that'll fit in a ~2 day timebox. |
Sigh, not going to fit in the milestone |
Currently, these components have both state and render views, which is an antipattern - see https://medium.com/@learnreact/container-components-c0e67432e005#.jv7qgdyhi and https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0#.b5tp6c91z.
This is setting a bad precedent on our own conventions (we have separate
containers
andcomponents
folders, but they're all over the show)Note that kickassets does this pretty well, check
containers
vs.views
folders: https://github.com/unclecheese/silverstripe-kickassets/tree/master/javascript/src/The text was updated successfully, but these errors were encountered: