Const A = lazy(() => import(“compA”))
render() {
<Suspense fallback={<B/>}
<A>
<B />
</A>
</Suspense>
}
I want B to be loaded while A is resolving. But fallback unmounts B and is mounted again when A resolves.
I've tried useRef and useMemo hooks for component B, but that still does not resolve the issue. How can I achieve not remounting the component B when A resolves in above scenario?