Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use_channel_layer hook #38

Closed
1 task done
Archmonger opened this issue Jan 10, 2022 · 0 comments · Fixed by #221
Closed
1 task done

use_channel_layer hook #38

Archmonger opened this issue Jan 10, 2022 · 0 comments · Fixed by #221

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Jan 10, 2022

Old Behavior

Currently there is no way of sharing component states across multiple clients.

Proposed Actions

Add in the ability for arbitrary data to be synchronized cross-client.

We will use Django Channels layers to communicate a state across multiple clients. In order to use this feature, the user will need to first configure a Django Channels Layer with a backend such as redis.

The user interface might end up looking like this:

@component
def example():
    sender = use_channel_layers(receiver, channel_name="example", group_name="example")

    return ...

async def receiver(event: dict):
    ...

Code of Conduct

@Archmonger Archmonger changed the title Shared Client State using Channels Layers use_layer_state hook Jan 16, 2023
@Archmonger Archmonger changed the title use_layer_state hook use_channel_layer hook Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant