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

server_component.set_selector doesn't work #171

Closed
Nicd opened this issue Aug 16, 2024 · 1 comment
Closed

server_component.set_selector doesn't work #171

Nicd opened this issue Aug 16, 2024 · 1 comment

Comments

@Nicd
Copy link
Contributor

Nicd commented Aug 16, 2024

As far as I understand it, a new subject is being created here but then it's thrown away and nothing selects from it, so the SetSelector call is not received:

let self = process.new_subject()

@hayleigh-dot-dev
Copy link
Collaborator

set_selector has now been deprecated in favour of select https://hexdocs.pm/lustre/lustre/server_component.html#select. This Effect gives you access to both the dispatch function also given to effect.from and a fresh subject that you can hand to other actors. You are expected to return a selector from this function, and typically that would be a selector for this fresh subject, but it could be anything. It will be merged with any selectors already set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants