I'm using Redux with Typescript, and I can't pass data between Components.
EmpList.tsx
function mapStateToProps(){//mapping here}
.... //body of a Component
export default connect(mapStateToProps)(EmpList)
Tool.tsx
import EmpList from './EmpList'
....
private empListTemp: RefObject<EmpList> = createRef()
The problem is that I get an error in the Tool.tsx 'EmpList refers to a value but is being used as a type here'.
Now, If I remove connect(mapStateToProps) from export, or put export{mapStateToProps, EmpList} in the EmpList.tsx, I don't have that error anymore, but obviously Redux won't work then.