mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-12 11:55:23 +08:00
19 lines
384 B
JavaScript
19 lines
384 B
JavaScript
import createReactContext from 'create-react-context/lib/implementation';
|
|
|
|
const React = require.requireActual('react');
|
|
|
|
if (!React.createContext) {
|
|
React.createContext = createReactContext;
|
|
}
|
|
|
|
if (!React.createRef) {
|
|
React.createRef = () => {
|
|
const ref = function setRef(node) {
|
|
ref.current = node;
|
|
};
|
|
return ref;
|
|
};
|
|
}
|
|
|
|
Object.assign(module.exports, React);
|