我的模态正常工作,即打开和关闭第一次完美,但是,它不会再打开。我看到下面的错误控制台 -Foundation Reveal Modal未使用React进行关闭15.3.2
-
Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
-
Uncaught (in promise) Error: Attempted to update component 'ErrorModal' that has already been unmounted (or failed to mount).
我需要我的模式我关闭每次毁灭?
ErrorModal.jsx
var React = require('react');
var ErrorModal = React.createClass({
componentDidMount: function() {
var modal = new Foundation.Reveal($('#error-modal'));
modal.open();
},
render: function() {
return (
<div className='reveal tiny text-center' id='error-modal' data-reveal="">
<h4>Some title</h4>
<p>Our Error msg</p>
<p>
<button className ='button hollow' data-close="">
Okay
</button>
</p>
</div>
);
}
});
module.exports = ErrorModal;