On 12/26/16, 11:30 PM, "yishayw" <yishayj...@hotmail.com> wrote:

>Personally, I would find it confusing to use a component that declares an
>event that isn't dispatched. So if Toast never dispatches 'action' it
>should
>probably not declare it. I would make Toast and Snackbar two separate
>components and have them share as many beads as possible for code reuse.
>

I'm not sure I quite understood what Piotr was planning, but Yishay seems
to have the right idea.  One way to know if you are getting the right
separation into beads is to look at your if statements.  There shouldn't
be as many "if" statements checking whether to do something in PAYG code.
You simply add more powerful beads in addition or in replacement.  So
checking for a controller to decide whether to dispatch an event doesn't
quite seem right from the description, but maybe there is a good reason
for it.

My 2 cents,
-Alex

Reply via email to