Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Tylor Steinberger
@TylorS
Hey @czertbytes You usually don't want to do that type of thing inside of main(). You'd generally want to make that driver.
Cycle.run(main, {
  keypress$: () => Rx.Observable.fromEvent(document, 'keypress')
})
The reason DOM.select() doesn't select from document, is because it's external to your main(). Drivers are the place where you listen to what is external to your main().
Daniel Hodan
@czertbytes
hi @TylorS , right, thanks ;)
Tylor Steinberger
@TylorS
:+1: No problem.
Raquel Moss
@raquelxmoss
Oh good, my instincts were right :-) thanks @TylorS
Steve Lee
@SteveALee
@TylorS you were missed at cycleconf :(
The #cycleconf live stream https://youtu.be/B2BFwIshais
Steve Lee
@SteveALee
@raquelxmoss @Tylor, agree, am using handler on doc in driver
Other attempts were intermittently successful, presumably dependent on where focus was
Dmitrii 'Mamut' Dimandt
@dmitriid
  • CycleConf: awesome
  • Participants: awesome
  • 10/10: would do it again
I will write a blog post or two about my experiences with cycle.js as a n00b :)
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)