我尝试测试 getUserConfirmation 的功能。代码如下:
getUserConfirmation={(message, callback) => {
const container = document.createElement('div');
// callback(false);
document.body.append(container);
ReactDOM.render(
<div
style={{
width: '400px',
height: '400px',
backgroundColor: 'black',
zIndex: 1000,
}}
/>,
container,
console.log('Here'),
);
}}
>
代码对我更改 url 和回调 (console.log('here')) 的尝试作出反应。但是浏览器中什么也没有出现。我做错了什么?