feat: honor displayName of context types by eps1lon · Pull Request #18224 · react/react (original) (raw)

Summary

New iteration of #18035 which had to be reverted (#18223) since setting Context.Consumer.displayName would throw.

Setting Context.Consumer.displayName ignores the given value but emits warning. As far as I can tell this doesn't do anything on master: https://codesandbox.io/s/priceless-hooks-lm0ky

Test Plan

@trueadm should sign this off since this affects internal tests. If a warning is still too loud we could put it behind a flag that we turn off for the fb builds.