Skip to content
Discussion options

You must be logged in to vote

Hi @CodeSmith32, this is an excellent question.

The "no access to elements" is a principle for day-to-day development to keep streams declarative and help separating concerns.

When creating low-level integrations or fine tuning things are obviously a bit different. The idea, just like with side effects, is not to eliminate them, which would be impossible, but rather to maintain a clean separation.

There are a few ways to get access to the actual DOM element.

  1. Create a custom sink. Every sink has access to its own DOM element, as it's the piece of code in charge of making changes. All sinks get a reference to their host element and return a function to perform the actual DOM manipulation. …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@CodeSmith32
Comment options

@dariomannu
Comment options

Answer selected by CodeSmith32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants