Is it even possible to have bi-directional single-spa project?
Let's say the host takes in two applications, one navbar written in react, and one dashboard written in vue. Now, the host easily can render each application by url pathname. But what if I want to work with the navbar, I still want to see how that affects the layout of the dashboard.
So, when working with the navbar, is it possible to use host as an entry point for rendering all other apps as well?
In react let's say I have the following:
import { lazy } from "react";
import "./App.css";
const host = lazy(() => import("host/Host")) as unknown;
function App() {
host
return (
<div>Layout</div>
);
}
export default App;
And in my host-app:
import { registerApplication, start } from "single-spa";
registerApplication(
"layout",
() => import("layout/App"),
(location) => location.pathname.startsWith("/")
);
registerApplication(
"dashboard",
() => import("dashboard/App"),
(location) => location.pathname.startsWith("/")
);
start();
I am only able to render them by host, not bi-directional.