reactModal全局单实例调用
react,单实例登陆框,可以通过SingleGitLogin.show()进行调用。 但是为什么是单实例,其实我并不是非常清楚,如果大神能够解释就好了。 import GitLogInfo from '@/components/GitLogInfo/GitLogInfo' import SingleDemo from './SingleDemo'; import React from 'react'; import { Modal, Radio, Alert } from 'antd' import RadioGroup from 'antd/lib/radio/group'; import ReactDOM from 'react-dom' import { LoginModal } from '@/components/ProjSpace/ModalComponents/SingleDemo' import Pubsub from 'pubsub-js' let index = 0; let div; function domRender(reactElem, node) { //let div; console.log(index++, "this is domRender", div); if (node) { div = typeof node === 'string'