Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Dmitrii 'Mamut' Dimandt
@dmitriid
Also, finally starting a proper project in cycle today
w00t
Dmitrii 'Mamut' Dimandt
@dmitriid
It also amused me to no end that there were TWO Moldovans at the conference. And one of them was giving a talk :)
Dmitrii 'Mamut' Dimandt
@dmitriid
also, a question: I'd like to use Cycle Diversity and XStream right away:
  • is it wise?
  • where do I get them?
Vincent Orr
@Cmdv
well they are both still in development so I wouldn’t advise it just yet, xstream is on staltz github account and diversity is on a branch on core :)
Raphael Mu
@edge
I'd wait at least until #196 is closed
André Staltz
@staltz
@dmitriid great summary :D
Dmitrii 'Mamut' Dimandt
@dmitriid
@Cmdv @edge Thanks!
André Staltz
@staltz
xstream can be used as npm install xstream and reading the README
Dmitrii 'Mamut' Dimandt
@dmitriid
@staltz I have to use all this while I'm still inspired, or I'll end up like the dog in @SteveALee's presentation :)
André Staltz
@staltz
Cycle Diversity works, it's not incomplete, but it's release candidate because we don't have docs yet
Dmitrii 'Mamut' Dimandt
@dmitriid
cool
André Staltz
@staltz
but the migration is rather simple. most of the code stays unchanged
Dmitrii 'Mamut' Dimandt
@dmitriid
I like the sound of that :)
André Staltz
@staltz
I'd recommend people at least try to convert their codebases to Diversity
I already did with power-ui and it worked...
Raphael Mu
@edge
haven't been keeping up with Diversity but I assume if I use xstream-run and some other driver uses rx, both xstream and rx would be in the final bundle?
André Staltz
@staltz
yes
We will change the stream library in the official drivers to be xstream
Without anyone noticing that (apart from the fact of the dependency in package.json)
Steve Lee
@SteveALee
Eh. Hm. :) so the rx dependency in the diverse branch of examples I'd for drivers?. Would-be fantastic to lose it completely to get bundle size down.
Alex
@whitecolor
why people care so much about bundle size? I think this it is really ephemeral advantage
André Staltz
@staltz
@whitecolor depends really on the case. On mobile it's a big constraint
Also, if you can easily have a smaller bundle, why not?
Alex
@whitecolor
I mean I don't consider this a factor when choosing library, if it comes with it - that is nice
Tylor Steinberger
@TylorS
@SteveALee Thanks! Wish I could have been there.
Churchill Lee
@FeliciousX
anyone knows a good repo as an example for implementing a cycleJS app + testing?
Steve Lee
@SteveALee
+1. Plus an example using ASCII marble please! :)
@whitecolor it matters for those not on Firstworld standard connections usually experienced by us luck folks. That includes me travelling on a train trying to access a web site via really bad mobile signal :)
Michal Vanko
@michalvankodev
How do you get HTTP driver to work with xstream-run?
For me it says that request$.map(...).replay is not a function
And I've updated to "@cycle/http": "^9.0.0-rc2",
Laszlo Korte
@laszlokorte
@michalvankodev how does your code look like? especially the replay call?
Adam Wendell
@AdamWendell
It's in the http driver I think.
Michal Vanko
@michalvankodev
the replay call is in the http driver.. xstream doesn't have replay functionality
Laszlo Korte
@laszlokorte
Oh I see
In xstream it's called remember.
Adam Wendell
@AdamWendell
let response$$ = request$
      .map(request => {
        const reqOptions = normalizeRequestOptions(request)
        let response$ = createResponse$(reqOptions)
        if (typeof reqOptions.eager === `boolean` ? reqOptions.eager : eager) {
          response$ = response$.replay(null, 1)
          response$.connect()
        }
        Object.defineProperty(response$, `request`, {
          value: reqOptions,
          writable: false,
        })
        return response$
      })
      .replay(null, 1)
Michal Vanko
@michalvankodev
@AdamWendell Exactly there
In that point of time the request$ is a MemoryStream of xstream
Laszlo Korte
@laszlokorte
I guess the drivers need to be ported in order to support xstream?
André Staltz
@staltz
The official drivers versioned as x.x.x-rc already support xstream
And they also support rxjs v4 and v5
Michal Vanko
@michalvankodev
And I've updated to "@cycle/http": "^9.0.0-rc2",
the driver is called before it is adapted with streamAdapter
André Staltz
@staltz
ok, and did you also import rx 4.x ?
because the http driver in diversity uses that, you need to install it too
check this example how it has both rx (uses v4 in the driver, v5 in the app)