If components X and Y use shared data, what is the most maintainable way to do that?
<p>If components X and Y are children of component A, and X and Y use some shared data that comes from a REST api call, what is the best way/pattern to do it?</p>
<p>Since the data from the api call doesn't change often, we only need to access the api once for both components.</p>
<h2>Option 1: Both components use a Service</h2>
<h2>Option 2: Component A uses a Service, and passes the data into the children</h2>
<hr />
<p>What if component X or Y is more than one level separated from component A? Do we just pass the data all the way down? Even if the intermediate component doesn't use it?</p>