Skip to content

Communicating with parent components #467

@QuasiStellar

Description

@QuasiStellar

According to docs, child components are not to use ComponentContext's of their parents. So something like this is wrong:

class MyComponentImpl(
    componentContext: ComponentContext,
    rootContext: ComponentContext,
) : MyComponent, ComponentContext by componentContext {
    ... = rootContext
        .instanceKeeper
        .getOrCreate(...

So what is the right way of creating a communication between parents and their children? For example I want to store some configuration at the root level, so root's children (and children of the children) can use and modify it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions