Document Type
Article
Publication Date
11-11-2022
Keywords
Reactive Programming, RxJS, JavaScript
Abstract
RxJS is a popular JavaScript library for reactive programming in Web applications. It provides numerous operators to create, combine, transform, and filter discrete events and to handle errors. These operators may be stateful and have side effects, which makes it difficult to understand the precise meaning of the resulting computation. In this paper, we define a formal model for RxJS programs by formalizing a selected subset of RxJS operators using a small-step operational semantics. We present several debugging related applications using the semantics as a model. We also implemented a subset of RxJS based on this semantics, which provides convenient access to the runtime representation of the RxJS program to help debugging.
Recommended Citation
Tian Zhao and Yonglun Li. 2022. Semantics of RxJS. In Proceedings of the 9th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems (REBLS ’22), December 07, 2022, Auckland, New Zealand. ACM, New York, NY, USA, 13 pages. https://doi.org/10.1145/3563837.3568340