The particular component type doesn't matter in cases with multiple contexts, however I would use a functional component.
Context is primarily used when some data needs to be accessible by many components at different nesting levels.
Make tests unaware of its existence and avoiding mocks.
context
- React Context is a method to pass props from parent to child component(s), by storing the props in a store(similar in Redux) and using these props from the store by child component(s) without actually passing them manually at each level of the component tree.
useContext()
- A hook used to create common data that can be accessed throughout the component hierarchy without passing the props down manually to each level. Context defined will be available to all the child components without involving “props”.
static context
- A static method or, block belongs to the class and these will be loaded into the memory along with the class.