Questions tagged [cyclejs]

CycleJS is a fully reactive JavaScript framework for Human-Computer Interaction

Cycle.js: a functional and reactive JavaScript framework for cleaner code.

Your app and the external world as a circuit:

Your app and the external world as a circuit:

Cycle’s core abstraction is that your application is a pure function: main(). A function where inputs are read (sources) from the external world and outputs (sinks) are written to the external world. These side effects in the external world are managed by drivers: plugins that handle DOM effects, HTTP effects, and other side effects.

The internals of main() are built using Reactive programming primitives, which maximize the separation of concerns, providing a clean and fully declarative way of organizing your code. The dataflow is plainly visible, making it easy to read and understand the code.

Read more at cycle.js.org.

117 questions
0
votes
0 answers

multiple request getting fired cycle js

I am trying to write an application in cycle js using the cycle js http driver. Here's the response subscriptions for the call which is getting fired 3 times. One subscription i need in the login page and another in the main. It's…
0
votes
1 answer

"React is undefined" error in CycleJs app

I am experimenting with cycle.js and webpack. I have got the following index.js file which almost a copy of what I found on cycle.js documentation. import Cycle from '@cycle/core'; import {makeDOMDriver, hJSX} from '@cycle/dom'; function…
Suhas
  • 7,919
  • 5
  • 34
  • 54
0
votes
1 answer

CycleJs - Subscribing events of the same element which has different classes

I created an element with class foo. Then I intended to swap its class with bar after an click event was occurred. However, when I clicked the element, streams that subscribes the click events of the foo and bar were triggered successively. As a…
erdal
  • 421
  • 3
  • 10
0
votes
2 answers

Crash with simple history push

just trying come silly stuff and playing around with Cycle.js. and running into problem. Basically I just have a button. When you click it it's suppose to navigate the location to a random hash and display it. Almost like a stupid router w/o…
Bojan
  • 137
  • 6
0
votes
2 answers

How do I create a dynamic, repeating list of elements with Cycle.js?

With Cycle.js, I'm trying to create a view that renders a dynamic number of components when given a set of data points. However, I can't figure out how to create repeating views. I've stripped everything back to the most basic example of how I…
gargantuan
  • 8,888
  • 16
  • 67
  • 108
0
votes
1 answer

CycleJS - subscribing click events of a child component

I am new to CycleJS and I would like to subscribe 'click' events of a child component from its parent component; but, it's not working. I'm able to subscribe events inside the child component. Is it possible to subscribe events of a child component…
Nurlan Mirzayev
  • 1,120
  • 1
  • 7
  • 15
0
votes
1 answer

How to handle event side effects?

I'm trying to implement a dropzone such as this React Component. However, I'm a bit stuck on how to apply write effects on events, e.g. dragOver$: DOM .select('#dropzone') .events('ondragover') .map(e => { e.preventDefault() …
ronag
  • 49,529
  • 25
  • 126
  • 221
0
votes
1 answer

Rx timer state not updating in view in Cycle.js

I'm starting a timer when someone clicks a button that I intend to use as the opacity for some element. When I use do to trace the value I can see it spitting out to the console 40 times, but in the view the number stays put. Not sure where I'm…
azium
  • 20,056
  • 7
  • 57
  • 79
0
votes
1 answer

Rx (JS): how to update subscriptions in flatMap stream

I have a state$ stream that constains messages$s which is array of messages$ stream. State$ is updated and new messages$ appear. I want subscriber to handle messages from all messages$ in one sinle stream an I want this this stream contain only…
WHITECOLOR
  • 24,996
  • 37
  • 121
  • 181
0
votes
1 answer

Installing Cycle.js and running examples: enoent package.json file is missing

I don't have too much experience in NodeJs. I wanted to try Cyclejs. The documentation says: Create a new directory and run this inside that directory: npm install rx @cycle/core @cycle/dom When I do this, I get the following warning: ➜ …
Mert Nuhoglu
  • 9,695
  • 16
  • 79
  • 117
-1
votes
1 answer

cycle.js - is there a way to implement event handlers like in React?

I recently ran into Cycle.js, and, except for what I'm about to ask, I like the framework. Is there a way to implement event handlers directly on the DOM helper? Something like: function main(sources) { //... const clickEvent$ =…
-1
votes
1 answer

How to stop stream from ending

How to stop the take method from ending nested streams, to be used with flatten? Is there some other solution to nested streams? I tried merging fromDiagram without end symbol, but apparently that doesn't work.
janat08
  • 1,725
  • 2
  • 16
  • 27
1 2 3 4 5 6 7
8