0
componentDidMount(){
  jQuery(function($) {          
    $('#myModal').modal('show');
  });
}

I'm using jquery with reactjs, When i'm using this, an error is getting is like

Unhandled Rejection (TypeError): Object(...) is not a function.

I don't know why this error is coming

Tholle
  • 108,070
  • 19
  • 198
  • 189
Jayakar Pj
  • 21
  • 1
  • 4
  • Welcome to Stack Overflow Jayakar! It's difficult to say what might be wrong without seeing more code. Please provide a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). Also, you most likely don't want to use jQuery for this. Consider changing a value in your component state and use that to conditionally render the modal instead. – Tholle Mar 10 '19 at 13:29
  • Possible duplicate of [How to use JQuery on ReactJS](https://stackoverflow.com/questions/38518278/how-to-use-jquery-on-reactjs) – Anurag Srivastava Mar 10 '19 at 13:44

0 Answers0