diff --git a/docs/2-guides/1-building-a-feedback-form/README.md b/docs/2-guides/1-building-a-feedback-form/README.md index 3f12802c..17168ea0 100644 --- a/docs/2-guides/1-building-a-feedback-form/README.md +++ b/docs/2-guides/1-building-a-feedback-form/README.md @@ -81,17 +81,17 @@ jahiaComponent( nodeType: "hydrogen:feedbackWidget", componentType: "view", }, - ({ question }: Props) => , + ({ question }: Props) => , ); ``` You'll need to restart `yarn dev` for Vite to collect your new client files, but once pushed, should see the exact same button as before, but now it will alert "Hello World!" when clicked. -The `RenderInBrowser` component is a wrapper that will ensure the code of `Widget` gets forwarded to the browser, enabling what is called Island Architecture: this component will be rendered client-side, but the rest of the page will remain server-rendered. This is a great way to improve performance, as it allows to only ship the JavaScript that is needed for the interactive parts of your page. +The `Island` component is a wrapper that will ensure the code of `Widget` gets forwarded to the browser, enabling what is called Island Architecture: this component will be rendered client-side, but the rest of the page will remain server-rendered. This is a great way to improve performance, as it allows to only ship the JavaScript that is needed for the interactive parts of your page. -The `props` prop of `RenderInBrowser` allows you to pass props to the component that will be rendered in the browser. Because they will be sent to the browser, they should be serializable. +The `props` prop of `Island` allows you to pass props to the component that will be rendered in the browser. Because they will be sent to the browser, they should be serializable. -If you nest children to `RenderInBrowser`, they will be displayed until `Widget` is loaded. This is where you can put a loading message for instance: `The widget is loading...`. +If you nest children to `Island` in `clientOnly` mode, they will be displayed until `Widget` is loaded. This is where you can put a loading message for instance: `The widget is loading...`. You now have all the tools needed to build any client-side component, but keep on reading to learn how to send data to jCustomer. diff --git a/docs/2-guides/2-accessibility-and-performance/README.md b/docs/2-guides/2-accessibility-and-performance/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/2-guides/2-island-architecture/README.md b/docs/2-guides/2-island-architecture/README.md new file mode 100644 index 00000000..c37a98e5 --- /dev/null +++ b/docs/2-guides/2-island-architecture/README.md @@ -0,0 +1,337 @@ +# Island Architecture + +Jahia JavaScript Modules offers a first-class support for this architectural pattern, allowing interactivity without compromising on performance. + +## What is Island Architecture? + +We have written a [complete article on the topic,](https://www.jahia.com/blog/leveraging-the-island-architecture-in-jahia-cms) but here is a quick summary: + +- Instead of shipping fully static or fully dynamic pages, Island Architecture is the middle ground where most of the page is static, but specific parts are made interactive on page load. + + [A page mockup with two interactive islands: a navigation bar and a video player](./islands.svg) + + In this example, the page is mostly static, with the exception of the `` and `