Consumers currently can't have props, and they create a new DOM element context-consumer which can cause problems for hierarchy/styling/etc since you can't currently apply classes, data attributes, etc to this component.
I propose this is done by doing the following:
Allow the Consumer functional component to take any props instead of <{}>
Have the consumerRender function take a third argument, props
Pass the props of the Consumer functional component to the consumerRender function
Update documentation to show the usage of props through destructuring:
Consumers currently can't have props, and they create a new DOM element
context-consumer
which can cause problems for hierarchy/styling/etc since you can't currently apply classes, data attributes, etc to this component.I propose this is done by doing the following: