Skip to content

Many contexts in one component #178

Description

@CodeWithMichal

Hi, I am having difficulty using more than one context in component. Say I have two contexts:
-InfoContext
-ErrorContext

I know what to do if I want to use only one of them, since its simply:
export default withAlert(InfoContext)(App)
or
export default withAlert(ErrorContext)(App)

But how can I use both of them in component? I tried to pass both contexts, like:
export default withAlert(InfoContext, ErrorContext)(App)
however I stucked at this point. Any sugestions?

Best regards,
Michał

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions