ReactiveX / ReactiveX/rxjs

Add `set` alias for `next` on `BehaviorSubject`

Open
#4,740 14 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
31.7k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

Per this discussion on Twitter

Basically, svelte has amazing support for RxJS. Particularly in reading from RxJS observables.

This very small addition to RxJS would enable Svelte users to very conveniently trigger reactive updates through RxJS.

Proposal

Just alias next as set on BehaviorSubject. (I don't see a reason yet to add it to all subjects).

That would enable Svelte users to simply bind to them in their templates.

cc/ @Rich-Harris

Other things

It's probably worth discussion with Svelte experts if this solves a big enough use case for them to be a valid change, and/or what other use cases we might need to consider.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the BehaviorSubject entry point and reviewing how its existing next API is exposed; the issue does not name a file or test. Done means BehaviorSubject provides set as an alias for next, with tests covering the new API and its existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.