Skip to content

Commit

Permalink
Update isomorphic example to DOM.select().events()
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Medeiros committed Sep 8, 2015
1 parent 60c2348 commit 086f8d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion isomorphic/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function renderAboutPage() {
}

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

Expand Down
6 changes: 3 additions & 3 deletions isomorphic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"author": "Andre Staltz",
"license": "MIT",
"dependencies": {
"@cycle/core": "2.0.x",
"@cycle/dom": "4.0.x",
"@cycle/core": "3.1.x",
"@cycle/dom": "5.1.x",
"babel": "5.8.x",
"babelify": "6.1.x",
"browserify": "11.0.1",
Expand All @@ -15,6 +15,6 @@
"uglifyify": "^3.0.1"
},
"scripts": {
"start": "babel-node ./server.js"
"start": "npm install && babel-node ./server.js"
}
}
2 changes: 1 addition & 1 deletion isomorphic/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ server.use(function (req, res) {
DOM: makeHTMLDriver(),
context: () => context$
});
let html$ = responses.DOM.get(':root').map(prependHTML5Doctype);
let html$ = responses.DOM.map(prependHTML5Doctype);
html$.subscribe(html => res.send(html));
});

Expand Down

0 comments on commit 086f8d9

Please sign in to comment.