Use react-redux useSelector with typescript
When trying to use the new useSelector hook (see below example) of react-redux typescript gives an error that the function does not exist: Module '"../../../node_modules/@types/react-redux"' has no exported member 'useSelector'. TS2305 Example: import * as React from "react" import { useSelector } from "react-redux" import { Message } from "./Message" export const MessageContainer = () => { const searchValue = useSelector((state) => state.search) return ( <Message searchValue={searchValue} /> ) } Used versions: "react-redux": "^7.1.0-alpha.5" "@types/react-redux": "^7.0.9"
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.