-2

When the action is called like this.props.getCurrentProfile() I'm getting this is not a function. But I've used this syntax before and In the same application but I'm not any error on those. I don't how I'm getting same error on new component when I call action.

enter image description here This is my component where I'm getting error. But I'm every component where I call this.props.xxx();

enter image description here this is my action file

enter image description here this is the error I'm getting.

1 Answers1

0

You need mapDispatchToProps put to connect : For example: What is mapDispatchToProps?

Oleg
  • 3,580
  • 1
  • 7
  • 12
  • I added the mapDispatchToProps but then also its not working. In the previous components it is working without any error same code without mapDispatchToProps(). Please guide me how to solve this error. – Sandeep Sep 25 '19 at 05:55
  • Can you supply live demo? – Oleg Sep 25 '19 at 05:58
  • Now its working but I didn't make change to the code. I don't know how it started working. I was getting this for past 7 days.Thank you for helping me. – Sandeep Sep 26 '19 at 10:36