The available space is {dimension.width} x {dimension.height} and the counter is {counter}. </p> ) const enhance = compose( withDimension, connect( state => ({ counter: state.counter }) ) ) export default enhance(MyComponent)
component tree without having to pass the props down manually at every level. You can do this directly in React with the powerful "context" API. - https://facebook.github.io/react/docs/context.html
<LinkMetrics offer="OfferA"> <Link to="/some-view">Some view</Link> // I was clicked at view "Home" and offer "OfferA" </LinkMetrics> </OfferA> <OfferB> <LinkMetrics offer="OfferB"> <Link to="/some-other-view">Some other view</Link> // I was clicked at view "Home" and offer "OfferB" </LinkMetrics> </OfferB> </LinkMetrics> </HomeView> )