The context of the question is that we have an application that uses a ton of providers / context, i.e. some routes will start as:
<A>
<B>
<C>
<D>
<Page />
</D>
</C>
</B>
</A>
and what I have come to realize that is that on some of these pages, none of these contexts are even used. Because these contexts may fetch data, this unnecessarily slows down the application.
I am looking for a method to detect and warn (in development mode) when a provider is used, but it's context is never accessed by the application. I suspect this should be possible using Proxy, though I have not seen prior art.