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

feat: replay option for RxReq #166

Merged
merged 1 commit into from
Jan 14, 2025
Merged

feat: replay option for RxReq #166

merged 1 commit into from
Jan 14, 2025

Conversation

penpenpng
Copy link
Owner

@penpenpng penpenpng commented Jan 14, 2025

resolve #161.

Added replay option to allow emit() before use(). This option will be enabled by default in the future.

const rxReq = createRxBackwardReq({ replay: true });

rxReq.emit({ ids: [ID_1] });
rxReq.emit({ ids: [ID_2] });
rxReq.emit({ ids: [ID_3] });

rxNostr.use(rxReq).subscribe(() => { /* ... */ });

// Note that it can be reused.
// rxNostr.use(rxReq).subscribe(() => { /* ... */ });

@penpenpng penpenpng merged commit 74679ed into main Jan 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option for ReplaySubject-like RxReq
1 participant