5 Matching Annotations
  1. Jan 2019
    1. 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.

    1. 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

    2. 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.

    3. 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.

    4. 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