Skip to content

Improve efficiency of context in islands code #8795

@cemms1

Description

@cemms1

In the PR to trial using React context for renderingTarget #8704, suggestions to improve the efficiency of the islands code were made, which should be looked into.

The same config value is being provided to all islands in a rendering request, when a more efficient way to do this might be to share this in a more common place (rather than props for each island) since the data will be the same for each request.

Summary of thread here:

You could serialise with JSON.stringify inside a single script tag with type application/json on the page?

Originally posted by @mxdvl in #8704 (comment)

To @mxdvl's suggestion here's an example I came across recently of using the script tag in apps-rendering

Originally posted by @ioannakok in #8704 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions