score:3

Accepted answer

i found an answer from yachaka who posted in this github issue for react-modal.

the script is loaded before the dom, resulting in react-modal setting the parent element of the modal to document.body before it exists.

this can be fixed by adding the lifecycle method componentwillmount as follows:

componentwillmount: function() {
  reactmodal.setappelement('body');
}

Related Query

More Query from same tag