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
start
I saw someone else's sample code that prevents calling start until after auth state is resolved, here: https://single-spa.slack.com/archives/C8R6U7MT7/p1630922393211100?thread_ts=1630914166.210900&cid=C8R6U7MT7 I think this is a fine enough idea to incorporate but I'd like to fully outline the benefits of doing so.
The text was updated successfully, but these errors were encountered:
Copying over the code from Slack (since they'll disappear into history)
import { registerApplication, start } from "single-spa"; import { constructApplications, constructRoutes, constructLayoutEngine, } from "single-spa-layout"; import { authLib } from "./auth"; const routes = constructRoutes( ... ); const applications = constructApplications({ routes, loadApp({ name }) { return System.import(name); }, }); const layoutEngine = constructLayoutEngine({ routes, applications }); applications.forEach(registerApplication); layoutEngine.activate(); authLib.onAuthSuccess = start; // 👈
This above code isn't necessarily an example of 'the right way' but is useful for reference.
Sorry, something went wrong.
No branches or pull requests
I saw someone else's sample code that prevents calling start until after auth state is resolved, here: https://single-spa.slack.com/archives/C8R6U7MT7/p1630922393211100?thread_ts=1630914166.210900&cid=C8R6U7MT7
I think this is a fine enough idea to incorporate but I'd like to fully outline the benefits of doing so.
The text was updated successfully, but these errors were encountered: