Skip to content

Dispatch is not a function #47

@joaopiramo

Description

@joaopiramo

Hey guys, I'm trying to make use of product context dispatch, but I'm always getting "dispatch is not a function".

I am importing these forms
import {useProductDispatch} from 'vtex.product-context / ProductDispatchContext'
or
import {useProduct, useProductDispatch} from 'vtex.product-context'

and I'm declaring the hook this way
const dispatch = useProductDispatch ()

however in all ways I am always receiving feedback
"dispatch is not a function"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions