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: Unresolved
    • Icon: Normal Normal
    • None
    • 4.16
    • Management Console
    • None
    • Moderate
    • No
    • False
    • Hide

      None

      Show
      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
              YaDan Pei YaDan Pei
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: