Our Project: Wikipedia Search
In this section we’ll build an application that searches Wikipedia as the user types.
RxJS already makes retrieving and processing the remote data easy, but, as you saw in Chapter 4, Building a Complete Web Application, we still need to jump through some hoops to make our DOM operations efficient.
One of the objectives of Cycle.js is to completely eliminate DOM manipulation from our code. Let’s start with some basic scaffolding:
| var Cycle = require('@cycle/core'); |
① | var CycleDOM = require('@cycle/dom') |
| var Rx = Cycle.Rx; |
| |
② | function main(responses) { |
| return { |
| DOM: Rx.Observable.just(CycleDOM.h( ... |
Get Reactive Programming with RxJS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.