You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problem in setting calling ref inside context api consumer #22750
I tried to call ref and set this in to react context's state. However, when I use this inside the consumer, ref is not called. See below demo for more detail.
Activity
hyochan commentedon Dec 22, 2018
I've managed to make above work by putting
ProfileModalinsideProvider. I am not sure this is a workaround or was expected behavior.Setup ProfileModalProvider correctly.
rickhanlonii commentedon Dec 31, 2018
Hey @hyochan, thanks for filing! This is expected, consumers need to be descendants of their provider (see https://reactjs.org/docs/context.html#contextprovider)