Frontmatter
| id | 9508 |
| title | Docs: Explain Main Thread Addons and Lazy Loading in Lifecycle guide |
| state | Closed |
| labels | documentationai |
| assignees | tobiu |
| createdAt | Mar 18, 2026, 11:19 AM |
| updatedAt | Mar 18, 2026, 11:21 AM |
| githubUrl | https://github.com/neomjs/neo/issues/9508 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 18, 2026, 11:21 AM |

The
Lifecycle.mdguide currently explainsinitAsyncprimarily 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.Baseas a prime example of howinitAsyncis 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
initAsyncdelays theisReadystate, 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").