Fork me on GitHub
Daniel Craig21:10:49

Is it bad practice to dispatch events from more namespaces than just the one views namespace?


I don't think so.

Oliver George22:10:37

Good separation of concerns can help keep you code maintainable. I try and avoid hard coding dispatches deep inside views. Better if those views take a callback prop and have no direct reframe ns use at all.


Huh, I prefer to put the dispatch directly inline in the view component. Course, no rule is absolute, so I might sometimes build a generic component. I generally though feel that the loss of generalization is outweighed by the gains in being able to see exactly what the component does without outside context.

👍 3
Oliver George22:10:51

I’m sure that’s common.