You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there can only ever be one app which is started by a single call to runApp(). This is fine for the server, but in the browser this has a few drawbacks:
The whole app has to be shipped to the client, including static parts without any interactivity.
This results in a larger js file and longer time to interactivity.
The page must be hydrated from the root up and synchronously for all parts.
Jaspr on the client should be able to handle multiple parallel applications bound to different parts of the page. It then should be possible to call runApp() multiple times with different attachment targets, e.g.:
This would start three different app instances (three separate component trees) bound to different parts of the app (here: header, sidebar and content areas).
This change would align very well the the 'Islands Architecture' pattern that became popular again with recent web development trends. Islands are interactive parts of the page, that can be loaded and hydrated separately from each other.
Goal: When supporting multiple apps, jaspr should provide the necessary tools to easily use the islands architecture pattern in a project.
Currently, there can only ever be one app which is started by a single call to
runApp()
. This is fine for the server, but in the browser this has a few drawbacks:Jaspr on the client should be able to handle multiple parallel applications bound to different parts of the page. It then should be possible to call
runApp()
multiple times with different attachment targets, e.g.:This would start three different app instances (three separate component trees) bound to different parts of the app (here: header, sidebar and content areas).
This change would align very well the the 'Islands Architecture' pattern that became popular again with recent web development trends. Islands are interactive parts of the page, that can be loaded and hydrated separately from each other.
Goal: When supporting multiple apps, jaspr should provide the necessary tools to easily use the islands architecture pattern in a project.
Useful links:
https://www.patterns.dev/posts/islands-architecture/
https://jasonformat.com/islands-architecture/
The text was updated successfully, but these errors were encountered: