React dependency inject enables to inject dependencies to component without import into it
Here is the sample
# Set dependency
import { setDI } from 'react-dependency-inject';
setDI({isFn:(fn) => fn && typeof fn === 'function'});
# Inject Dependency
import { withDI } from 'react-dependency-inject';
export default withDI(App);
Varghese John: