Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-30973

Can't import react-redux useSelector or useDispatch hooks because of typescript errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • 4.19.0
    • 4.16
    • Management Console
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • No
    • None
    • None
    • None
    • In Progress
    • Release Note Not Required
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      Every import of react-redux useSelector and useDispatch hooks must have ts and eslint override comments because @types/react-redux is out of sync with the react-redux and there are no type definitions for these hooks.

      Version-Release number of selected component (if applicable):

      4.16.0

      How reproducible:

          

      Steps to Reproduce:

          1. Import useSelector or useDispatch hook    

      Actual results:

      A typescript error is shown: "react-redux"' has no exported member named 'useSelector'

      Expected results:

      These modules can be imported without typescript errors    

              rh-ee-jonjacks Jon Jackson
              rh-ee-jonjacks Jon Jackson
              None
              None
              YaDan Pei YaDan Pei
              None
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: