-
Notifications
You must be signed in to change notification settings - Fork 11
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
Questions #1
Comments
Yes, I did give some thought to that very problem but unfortunately I didn't have time to discuss it during the talk. My approach (which is probably somewhere between a workaround and a real solution) is to use path-building functions to achieve a kind of relative addressing. See for example, the The idea is that I'm going to use reusable form field components in my registration form. The Definitely open to new ideas/alternatives/etc, so I'll leave this issue open for a while. Let me know what you think. |
By the way, the |
This seems certainly more sensical to me than just random key vectors floating around. Generally, though, I organize my entire db into entities and feature-specific state (forms, mostly, then usually some navigation state). I guess there's not a huge difference between |
Sorry in advance for making this an issue; I'm not really sure how else to reach you, but I also think the following might be useful for the public domain.
Mark, great talk!
I've been using re-frame on/off for over 3 years now. It's a fabulous front end paradigm, and I'm glad someone decided to dedicate conference time to the topic.
I have never really been satisfied with any sort of reusable component scheme that I've invented or found in the wild. There seems to be an inevitable tax to be paid with respect to unidirectional functional components and reusability. The elm language and elm architecture have been debating this topic for a very long time. Some approaches out of that world satisfy the "infinite abstract reusability" problem (can achieve any
N
number of components without any component having "a place"), but at the cost of scattered state (no single app-db, as re-frame would have it). Some approaches out of the re-frame world can achieve the same goal but with what feels to me like too much manual effort or "hand-holding".Your DRY approach to reducing handlers/subs is neat and seems like a step in the right direction to semi-autonomous components and low-effort reusability. However, something that immediately strikes me is how inflexible this might become over time. If each component is self aware enough to "know its slice in the db", it seems to be quite literally PLOP-oriented programming. To highlight a concrete problem: how do you handle the inevitable refactoring that stems from an evolution of an application (whether from changing requirements, better designs, better domain knowledge, etc.) if "places" are littered everywhere throughout the app? I find my app-db shape/schema changes quite regularly as the application evolves. Through judicious use of subscriptions and the great idea of inject-sub I am able to more-or-less keep any notion of "where" located to a single location (per component, or per feature). The proliferation of "wheres" everywhere makes me nervous, but the drastic reduction in boilerplate feels safer and less annoying.
Thoughts?
The text was updated successfully, but these errors were encountered: