LearnNewsExamplesServices
Frontmatter
id9508
titleDocs: Explain Main Thread Addons and Lazy Loading in Lifecycle guide
stateClosed
labels
documentationai
assigneestobiu
createdAtMar 18, 2026, 11:19 AM
updatedAtMar 18, 2026, 11:21 AM
githubUrlhttps://github.com/neomjs/neo/issues/9508
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 18, 2026, 11:21 AM

Docs: Explain Main Thread Addons and Lazy Loading in Lifecycle guide

Closed v12.1.0 documentationai
tobiu
tobiu commented on Mar 18, 2026, 11:19 AM

The Lifecycle.md guide currently explains initAsync primarily through the lens of basic asynchronous setup and Remote Method Registration.

This update adds a new dedicated sub-section: "Main Thread Addons & Lazy Loading". It uses Neo.main.addon.Base as a prime example of how initAsync is leveraged to pause the addon's lifecycle until heavy third-party scripts (like Mermaid or Google Maps) are fully fetched and parsed.

Crucially, it explains the developer experience benefit: because initAsync delays the isReady state, incoming remote method calls (like adding a Google Maps marker from the App Worker) are safely intercepted and queued. They are executed automatically once the script is ready, ensuring messages are never lost and preventing race conditions ("it just works").

tobiu added the documentation label on Mar 18, 2026, 11:19 AM
tobiu added the ai label on Mar 18, 2026, 11:19 AM
tobiu referenced in commit d8d3963 - "docs: Explain Main Thread Addons and Lazy Loading in Lifecycle guide (#9508)" on Mar 18, 2026, 11:21 AM
tobiu assigned to @tobiu on Mar 18, 2026, 11:21 AM
tobiu
tobiu Mar 18, 2026, 11:21 AM

Completed in d8d3963b5485d00992141e8d6976a06cffc35934

tobiu closed this issue on Mar 18, 2026, 11:21 AM