#93 Yield Action

You can yield an action from your component, let me explain with a quick example.  Let’s say you have a component for “tasks-list” which has children components of “task-item”.

The tasks-list component can yield an action:

Which you can pass into your task-item components

Your task-item component can now call the tasks-list yielded action

Tip inspired by: https://til.hashrocket.com/posts/0ac953d2b9-yielded-closure-actions-as-an-api-for-a-component

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu