Skip to main content

File

containers/{container}/layers/{layer}/index.{tsx,ts,jsx,js}

This file belongs to each layer assigned to layers in a container.

You can add your custom JavaScript logic or scripts specifically for that layer inside this file.

When the container is rendered, the script from this file will automatically be integrated into Container File.

If the script needs any external module or variable outside the script, simply include it in the Container File.

each layer function is the first input, the context constant, and the other values ​​returned from the parent.

containers/{container}/layers/{layer}/index.{tsx,ts,jsx,js}
export default (context, parent1) => {
return {
label: parent1.item.label,
};
};
info

⚠️ Important: When a layer file export default function or value, the system links it to that specific layer instance.

If you use a function within the file, the values defined inside it are limited to the scope of that function only.