117 questions
0
votes
1
answer
40
views
Checkbox type tag vanished using Cycle.JS with Snabbdom and Typescript (Parcel Bundler)
I have just tried to implement Typescript with a simple toggle-example in Cycle.JS.
Here is the setup:
package.json
{
"name": "parcel-cycle-playground",
"version": &...
-1
votes
1
answer
57
views
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) ...
0
votes
1
answer
37
views
What is the XStream imitate use case
The docs go over imitate use case, but I don't understand the example made. Where would you call a Parent function, is it like recursive? I'd like to see what the model function looks like, and what ...
0
votes
1
answer
62
views
In cyclejs, how to render a component with "if else"
function componentA(sources$) {
return {
dom$: ...,
http$: ...
}
}
function componentB(sources$) {
return {
dom$: ...,
http$: ...
}
}
function main(sources$) { ...
0
votes
1
answer
63
views
Is it possible to use @cycle/state for local state?
It seems that @cycle/state was intended to be used once per app, wrapping main. Is that true?
In other words, it seems that @cycle/state does not provide a solution for local state. And I am trying to ...
1
vote
0
answers
48
views
Cycle.js: What is the best way to handle File Drag and Drop
I want my Cycle.js web application to read data from a file dropped by the user on the page. I have something working by I'm not sure it is the right way to do it. Moreover, my component isn't easily ...
1
vote
1
answer
71
views
Cycle.js: Custom driver not emitting any event inside main()
I'm creating a custom cycle.js driver with the purpose of preloading images. The main function exports a sink stream imagesToLoad emitting an array of image URLs. Those are then loaded by the driver ...
0
votes
1
answer
56
views
how do I rendering multiple components using xstreamjs
Suppose, I want to render 3 buttons which are mapped from Array
export const homePage = soruces => {
const array$ = xs.fromArray([1,2,3])
return {
DOM: array$.map(e => {
...
0
votes
1
answer
54
views
Cycle.js: Getting Stream, Expecting Blob
I'm trying to create a record audio stream. I'm creating a promise stream from navigator mediaDevices.getUserMedia then mapping that stream to a media recorder stream. Finally I want to create a blob ...
0
votes
1
answer
98
views
How do I sequence HTTP requests in a Cycle.JS login form component?
I am new to Cycle.JS. Please forgive the typescript errors as well! I'm using create-cycle-app.
I made a simple login form component. It uses the DOM and HTTP drivers. I capture the submit event from ...
1
vote
1
answer
39
views
Must there be a type assertion in non-initial reducers?
Since the type of of a reducer is defined as
export type Reducer<T> = (state: T | undefined) => T | undefined;
In my reducers that are not the initial reducer, I must declare
state = state ...
1
vote
1
answer
358
views
second merged branch ignored in XStreams
I'm working on a Cycle JS app using storage and state plugins.
The app use xstream as reactive library.
I'm incapped in a strange behaviour.
My streams are as this diagram
On first session var ...
0
votes
2
answers
816
views
cycle.js how to enable Access-Control-Allow-Origin (CORS)
Experimenting with the cyclejs javascript reactive frameworks and I'm new to the paradigm.
I've set up a stream to read from an external URL (en.wikipedia.org) and get the following result:
Cross-...
0
votes
1
answer
157
views
Cycle.js - Driver - PhoenixJS (Websockets)
We currently have a VueJS application and I am looking at migrating it to Cycle.js (first major project).
I understand in Cycle.JS we have SI and SO for drivers (using adapt()); naturally a WebSocket ...
1
vote
1
answer
48
views
Unable to stream events within a mocked DOM source in CycleJs test
Given an isolated component built with CycleJs (the component works fine) :
import isolate from '@cycle/isolate';
import { div, ul, li, a } from '@cycle/dom';
function intent(domSource){
const ...