Skip to content

JoelCodes/the-book-of-rxjs

Repository files navigation

The Book of RxJS

Welcome to the Book of RxJS! This book is meant to serve as a textbook, reference guide, and collection of examples and musings on the art of RxJS, the JavaScript implementation of the ReactiveX library! RxJS takes many concepts you might already be familiar with, like Arrays and Promises, and combines them to make all of your async operations and data manipulations work together seamlessly, efficiently, and all with a declarative interface!

Skip to Table Of Contents

In time, this book will have explanations, diagrams, code examples, exercises, videos, and projects illuminating the use of this whole library! However, as of July 2023, this is still very much in an early stage, so you may be seeing unfinished chapters, or chapters that are merely outlines or code examples, so please bear with me through this stage. This particular format of Markdown pages in Github is also meant as an MVP, so I can get material online quickly. If you're willing to bear with me, I hope to create the most useful resource on RxJS available!


How Can I Help?

I'm so glad you asked!

  • For starters, if you find any mistakes or want more explanation, please log an issue.
  • I've set up discussions, so if you have any questions or suggestions, that's a good place to let me know. Keep it respectful in the comments, though.
  • If you have a really good tool for graphically representing RxJS streams, embedding helpful content, running quizzes, or the like, I'm more than open to a fork and a pull request!
  • I'm also open to other contributors writing content, so feel free to fork and PR! If I accept your work, I'll make sure you're credited for it.
  • If you like this, share, star, and fork!

And finally, if you want to say thank you and support the ongoing elaboration of this work, you can always buy me a coffee or support this project through Github Sponsors.


How to Use This Book

This book is unusual in its... bookiness. You might be looking to understand RxJS, write RxJS code, or design applications with the patterns defined in RxJS. You might be sold on RxJS, you might be skeptical. So there are many parts designed for different people at different stages in their journey with the library.

In my experience, there are 5 stages of RxJS:

  1. I know what RxJS is and some of its big ideas.
  2. I kinda know what can be done with RxJS, even I don't know how.
  3. I can read RxJS code and see how it accomplishes its goals
  4. I can use RxJS to solve problems
  5. I can reliably troubleshoot RxJS for correctness and performance

With that in mind, I recommend a bit of caution. If you're reading something, and you realize that you haven't understood anything for the last 2 minutes, stop. Maybe that part isn't for you right now. Take a look at it, register "I know that you can do this particular thing with RxJS, I just don't know how you can do this particular thing with RxJS." And that might be the thing you need to know right now.

The thing I have found in my journey with RxJS has been a complete and total rewiring of my brain. The more I have learned to streamline my understanding so that it works in RxJS, the easier it has been to break down complex coding problems and see them for what they were. Sometimes, I'll be working in another library, and jot down my thoughts as an Observable or set of operators, only to re-write my thoughts in the idioms of the library I was working in.

So, if you're just starting, a Tour of the Library will be an excellent place to start. Each chapter will have explanations, code samples, and perhaps even a quiz or a tutorial attached.

After that, there are a series of articles, little essays on what I've learned along the way. That will also include guides for integrating RxJS with other libraries, like React.

The last section is the cookbook. I say cookbook, but this will be less like "how you should do this" and more like "how I did this". The goal isn't to give you step-by-step instructions. The goal is to give you insight into how to approach designing applications with RxJS.

Finally, there is an index. If all goes well, the index will be your most potent resource for RxJS. You'll be able to look for any member of the library, and see every place it's used throughout this book. That will give you all sorts of context as you seek to understand what a specific operator might do or mean when used in a certain way.


Table of Contents

What is RxJS? | How much JavaScript and TypeScript do I need?





RxJS Libary Index

All | Classes | Subjects | Functions | Pipeable Operators | Creation Operators | Schedulers | Consts | Types | Deprecated

Next >>

About

The RxJS API, Organized

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published