- Jan 2019
-
single-spa.js.org single-spa.js.org
-
the best performance is achieved by calling registerApplication immediately, but calling start after the AJAX request is completed.
important note (and including paragraph) regarding how to achieve best performance when loading multiple apps (which is what single spa does...). Basically, registerApplication() first, but start() only after doing some other work, maybe like painting initial stuff on the web page.
Tags
Annotators
URL
-
-
single-spa.js.org single-spa.js.org
-
When called, this function should look at the URL to determine the active route and then create DOM elements, DOM event listeners, etc. to render content to the user
this is the purpose of the mount function
-
except that it doesn't have an HTML page
I think they mean that it doesn't have its own html page with head and body section. Instead, it has only its own section of the DOM, without those 'upstream' parts.
-
A reference to the singleSpa instance, itself. This is intended to allow applications and helper libraries to call singleSpa APIs without having to import it.
important. can it be useful to share information between different apps called by single-spa? I know there are other recommended mechanisms for this in single-spa world but just a thought - could be useful for that.
-
pass a reference to a common event bus so each app may talk to each other
this seems like a recommended way to share events and data between multiple apps in one single-spa instance. i wonder how technically this should be implemented
-