cyclejs / history

MOVED
59 stars 8 forks source link

In Universal example issue with ongoingContext$ in app.js file... #2

Closed Cmdv closed 9 years ago

Cmdv commented 9 years ago

so after using the Universal / Isomorphic example from link here and adding cycle-history I get an issue in app.js on this line

let routeFromClick$ = ext.DOM.select('.link').events('click')
    .doOnNext(ev => ev.preventDefault())
    .map(ev => ev.currentTarget.attributes.href.value);

let ongoingContext$ = ext.context
// this line bellow is throwing the error
    .merge(routeFromClick$).scan((acc, x) => {
      acc.route = x;
      return acc;
    });
TypeError: Cannot read property 'merge' of undefined

Not entirely sure if the app.js function needs to also change?

Cmdv commented 9 years ago

ps here is my repo, I've split files out to try make it more like a production app ready for expansion. :)

ps put it onto a branch was committing to master!!

TylorS commented 9 years ago

Is it safe for me to go ahead and close this? I feel as though most problems should have been addressed in cycle-starter?

Cmdv commented 9 years ago

yes of course sorry I missed this on my feed! I'll close it :smiley: