Summary
An island is a component that is interactive and will be hydrated on the client side. The server sends all the data from the island’sprops
for hydration, and the browser needs time to process and render these islands. Therefore, it is important to take some precautions when using islands:
- Minimize the amount of props to be sent/used for an island
- Make an island only what is necessary, remembering to use
children
for internal elements that do not need hydration.
Reducing the size of the props JSON sent to islands
When loading data from external APIs using Loaders and sending them to the Section, it is possible that the size of the payload negatively impacts the performance of the site. The impact occurs both in the initial loading time and in the hydration, where the page is “initialized” in the browser to make it interactive (usinguseEffect
,
useSignal
, etc…). You can view the size of the final JSON through the
Performance tab of one of your site pages in the Deco CMS.

Reducing data sent to islands
In this first example, we will show how to avoid sending too much data to an island. Let’s say there is a component called ProductCard that receives the entire JSON of a product.❌ Inappropriate approach
✅ Correct approach
Reducing the scope of an island
An island and its components will all be hydrated on the client side in order to operate. This means that for all defined elements of the island, they will be recursively hydrated. It is possible to reduce the scope of the island by passing any internal elements aschildren
of the island.
❌ Inappropriate approachIn the example below, we create an island that interacts with
localStorage
to
set a title for a gallery of items. In the example below, both the gallery props
will be passed to hydrate the TitleContainer
and will also be passed to
hydrate the Gallery
.
✅ Correct approachHowever, if the
Gallery
is passed as children to the island, it will be
rendered, serialized, and not hydrated! For the TitleContainer
, the children
is pre-rendered HTML ready to be displayed, and therefore it is not an island
itself.