Skip to content

ProductContextState does not have product/selectedItem property #59

Description

@IncognitaDev

Describe the bug
A clear and concise description of what the bug is.

The declaration const { product, selectedItem } = useProduct() cause a TS error that indicate "Property 'selectedItem' does not exist on type 'Partial"

To Reproduce
Steps to reproduce the behavior:

  1. import Product Context
  2. use useProduct Hook with destructuring syntax

Expected behavior

no type error

Desktop environment:

System:
OS: Windows 10 10.0.19042
CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz Memory: 2.13 GB / 15.79 GB
Binaries:
Node: 14.15.5 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.19041.964.0), Chromium (90.0.818.66) Internet Explorer: 11.0.19041.1

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions