Suppose, I have two separate components X and Y, where X is a dependency in Y(not a direct child in the project). Is it possible to access the context of Y in X?
ex:
<Y.Provider value={key: 'val'}>
<X />
</Y.Provider>
X is a separate project want to access Y's context, how can it be done? Can I import the context of Y in X and use it? Y is totally a separate(unknown until X is used as a dependency in Y) component?