We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a HOC like this
const asyncComponent = (importComponent) => { class WrapComp extends React.Component{ state = { component: null } componentDidMount(){ importComponent().then(cmp => { this.setState({component: cmp.default}); }); } render(){ const {forwardedRef, ...rest} = this.props C = this.state.component; return C ? <C ref={forwardedRef} {...rest} /> : null; } } return React.forwardRef((props, ref) => { return <WrapComp {...props} forwardedRef={ref} />; }); } const component = asyncComponent(() => import('./another.js'))
as you can see, because the importComponent is dynamic imported, I cant use this package before the HOC return
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a HOC like this
as you can see, because the importComponent is dynamic imported, I cant use this package before the HOC return
The text was updated successfully, but these errors were encountered: