Cycle.js: a functional, reactive JavaScript framework built around streams
A functional and reactive JavaScript framework for predictable code
At a glance
- What is it?
- Cycle.js splits every application into a pure function from input streams to output streams, with drivers handling the outside world. It is a small, MIT-licensed monorepo for developers who already think in observables.
- Who is it for?
- Adopt Cycle.js if your team already reasons in observables and you want the side-effect boundary to be explicit rather than scattered through components. Skip it if you need a large hiring pool, batteries-included routing and state, or a framework whose changelog moves every month: the newest release listed in the repository is Cycle Unified from 2017-02-09, and the last push was on 2026-06-09.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 170 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- cyclejs/cyclejs10,230 ★ · +6
| Repository | 2026-09-22 | 2026-11-25 |
|---|---|---|
| cyclejs/cyclejs | 10.2k | 10.2k |
6 Stars in the last 64 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The problem Cycle.js solves: side effects have no home in component code
Most JavaScript UI frameworks give you a component that renders markup and, somewhere inside its lifecycle, talks to the network, the DOM or a global store. The rendering logic and the effect logic end up in the same file, and testing the render path means stubbing the effect path. Cycle.js takes the opposite position. An application is a pure function. It receives streams of events from the outside world and returns streams of instructions to the outside world. Nothing else happens inside it.
The audience is narrow and specific. You need to be comfortable with reactive streams already, because the framework does not hide them. The README points newcomers at the official documentation at cycle.js.org rather than teaching the model in the repository. If you have never used RxJS or a similar library, the first hour with Cycle.js will be spent learning two things at once.
The repository itself is a monorepo of specialized packages rather than one library. The README states that the npm package @cycle/run lives in the directory run, and lists @cycle/dom, @cycle/history, @cycle/html, @cycle/http, @cycle/isolate, @cycle/most-run, @cycle/run and @cycle/rxjs-run as the packages it contains. That split is the design: you install the core plus the drivers you actually need, not a single bundle that assumes a browser, a router and an HTTP client.
How the main function and its drivers actually connect
The architecture is a loop with a hard boundary down the middle. On one side is your main function, which is pure. On the other side are drivers, which are not. A driver is the adapter between a stream of your application's requests and a stream of the outside world's responses. The DOM driver turns virtual DOM trees into rendered pages and turns user events back into streams. The HTTP driver turns request descriptions into responses. The history driver turns navigation intents into location streams.
Because the boundary is explicit, the dependency direction is fixed. Your main function never imports the DOM. It returns something the DOM driver understands. That is what makes the code predictable in the sense the project's tagline claims: given the same input stream, the same output stream follows, and the impure part is quarantined in a package you can replace.
The package list shows that the stream library is a choice, not a given. @cycle/run is the default runner, while @cycle/most-run and @cycle/rxjs-run exist for the most and rxjs libraries respectively. The README notes that most, rxjs and xstream are not under Cycle.js but are important dependencies, and displays their latest versions for convenience. Swapping the runner is therefore a real option, at the cost of rewriting operators that differ between stream libraries.
Isolation is the other structural piece. @cycle/isolate exists as its own package, which tells you that composing two instances of the same component without their state streams colliding is a problem the project treats as first-class rather than incidental. The repository also carries a state directory and a time directory alongside the drivers.
Installing Cycle.js and writing a first stream-driven app
The repository is a pnpm workspace: pnpm-workspace.yaml and pnpm-lock.yaml sit at the top level, and the root package.json declares private: true, which means the root is not published. The engines field requires Node.js 8 or newer. The root scripts are build, test, lint, docs and release-all, and they run pnpm recursive, so a contributor clones the monorepo and works across packages rather than installing one artifact.
For an application, you install the scoped packages from npm. The @cycle packages below are ones the README lists as living in this repository; xstream is one of the stream libraries it names:
npm install @cycle/run @cycle/dom xstreamWorking examples live in the examples directory of the repository, which is split into examples/basic, examples/intermediate and examples/advanced. Start there rather than guessing at the API. What the package layout tells you is the shape of the wiring: @cycle/run supplies the runner, @cycle/dom supplies the browser driver, and xstream supplies the stream primitives your main function will use.
If you want to build the monorepo itself, the root script is a recursive build over every package:
pnpm install
pnpm run buildThe same recursive pattern applies to pnpm run test and pnpm run lint. Note the toolchain pinned in the root package.json: TypeScript is fixed at exactly 3.2.4 with an equals sign, and tslint, prettier and commitizen are present as dev dependencies. That is a build from an older generation of tooling, and anyone forking the repository should expect to modernize it before adding packages.
Where Cycle.js stops being the right tool
The clear failure mode is a team that does not already think in streams. Cycle.js does not provide an escape hatch from its own model. There is no imperative setState to fall back on when a stream operator chain gets awkward. A developer who is productive in a conventional component framework on day one will not be productive here on day one, and the README's answer to a question is to read the documentation site, not to offer a gentler on-ramp in the repository.
The second constraint is the release cadence visible in the repository. The recent releases listed are unified-tag (Cycle Unified) on 2017-02-09, v7.0.0 (Cycle Diversity) on 2016-06-27 and v6.0.0 (Cycle Nested) on 2015-12-21. The last push to the repository was on 2026-06-09, so work continues, but the tagged releases are old. The root package.json pins TypeScript at 3.2.4 and still lists tslint, which has since been superseded in the wider ecosystem. A team that needs a framework with a predictable annual upgrade path will find the version history here unhelpful.
Third, the README is an index of packages, links and support channels rather than a guide. It states that discussion-like issues are labeled discussion and immediately closed, and directs questions to StackOverflow or Gitter. That is a maintenance policy, not a support contract, and questions go to external channels.
Cycle.js compared with React and RxJS on their own
The most direct alternative is React. React also lets you describe the UI as a function of state, and it also has an ecosystem of effect handling. The difference is where the impure work lives. In React, effects live inside components through hooks, and the component owns both the description and the effect. In Cycle.js, the component is a pure function and the effects live in drivers outside it. If your main complaint about React is that effect ordering inside components is hard to reason about, Cycle.js addresses precisely that. If your main complaint is bundle size or render performance, Cycle.js offers nothing on that axis.
The second alternative is using RxJS directly, without a framework. That gets you the stream algebra and none of the structure: you would have to invent the main-function convention, the driver boundary and the isolation mechanism yourself. Cycle.js is essentially that convention, packaged. The cost is that you accept its specific vocabulary and its package split.
The third alternative is a framework that ships routing, state and data fetching as one opinionated whole. Cycle.js deliberately does not. Routing lives in @cycle/history, HTTP in @cycle/http, and state in a separate state directory. That is more assembly work up front and less lock-in later. Whether that trade is worth it depends on how much you value being able to replace one driver without touching the rest of the application.
Licence, maintenance and what an upgrade actually costs
The repository is MIT licensed, and the root package.json repeats that with a license field. MIT is permissive: it allows commercial use, modification and redistribution with the licence text retained. That is a statement about the licence text, not legal advice, and if you are embedding the code in a product with its own compliance process, have that process read the LICENSE file at the repository root rather than this summary.
On maintenance, the facts are these. The repository is not archived. The last push was on 2026-06-09. The most recent release listed is Cycle Unified from 2017-02-09. Those two dates together describe a project that still receives commits but has not cut a tagged release in years. Treat the commit activity as the live signal and the release tags as historical.
Upgrade cost is shaped by the monorepo layout. Each package carries its own CHANGELOG.md, for example dom/CHANGELOG.md and run/CHANGELOG.md, so version drift between @cycle/dom and @cycle/run is something you check per package rather than in one place. The release tooling is scripted: .scripts/release.sh, .scripts/release-whatever-needs-release.sh and .scripts/check-release.js, driven by the release and release-all scripts in the root package.json. That machinery exists for maintainers, not consumers, but it explains why the packages version independently.
For a consumer, the practical question is which stream library you commit to. Because @cycle/most-run, @cycle/rxjs-run and @cycle/run are separate packages, moving from one to another is a migration, not a configuration change. Pick the one your team already knows.
Editorial conclusion
Adopt Cycle.js if your team already reasons in observables and you want the side-effect boundary to be explicit rather than scattered through components. Skip it if you need a large hiring pool, batteries-included routing and state, or a framework whose changelog moves every month: the newest release listed in the repository is Cycle Unified from 2017-02-09, and the last push was on 2026-06-09. Before committing, check the CHANGELOG.md inside the specific package directory you plan to depend on, and confirm that the stream library you want (xstream, most or rxjs) has a matching -run package.
Frequently asked questions
What is Cycle.js mostly used for?
It is a functional and reactive JavaScript framework for building applications where the main logic is a pure function between streams of events and streams of instructions. The repository splits the work into packages such as @cycle/dom for the browser, @cycle/http for requests and @cycle/history for navigation.
Which npm packages make up Cycle.js?
The README lists @cycle/dom, @cycle/history, @cycle/html, @cycle/http, @cycle/isolate, @cycle/most-run, @cycle/run and @cycle/rxjs-run, each living in a directory of the same name in the monorepo. The core runner is @cycle/run.
Does Cycle.js work with RxJS?
Yes. The repository contains a package named @cycle/rxjs-run specifically for running applications on RxJS, and @cycle/run is the default runner. The README notes that rxjs, most and xstream are dependencies rather than packages under Cycle.js itself.
What version of Node.js does the Cycle.js repository require?
The root package.json sets the engines field to node >=8. The same file pins TypeScript at exactly 3.2.4 and lists tslint among the dev dependencies.
What licence does Cycle.js use?
The repository is licensed under MIT, and the root package.json declares license: MIT. The full text is in the LICENSE file at the repository root.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/cyclejs-cyclejs)Star history chart for your README
[](https://hysenlabs.com/projects/cyclejs-cyclejs)Was this useful?