随笔分类 - Cycle.js
摘要:Now you should have a good idea what Cycle.run does, and what the DOM Driver is. In this lesson, we will not build a toy version of Cycle.js anymore.
阅读全文
摘要:This lessons shows how we are able to easily swap our toy DOM Driver with the actual Cycle.js DOM Driver, a more solid, more flexible, more efficient
阅读全文
摘要:Usually we use template languages like Handlebars, JSX, and Jade to create. One simple way we can create our own template language is to write a funct
阅读全文
摘要:Currently in our main() function, we get click$ event. function main(sources) { const click$ = sources.DOM; const sinks = { DOM: click$ .startWith(nul
阅读全文
摘要:Our previous toy DOM Driver is still primitive. We are only able to sends strings as the textContent of the container element. We cannot yet create he
阅读全文
摘要:Our application was able to produce write effects, through sinks, and was able to receive read effects, through the DOM sources. However, the main fun
阅读全文
摘要:So far we only had effects that write something to the external world, we are not yet reading anything from the external world into our app. This less
阅读全文
摘要:Currently the code looks like : // Logic (functional) function main() { return { DOM: Rx.Observable.timer(0, 1000) .map(i => `Seconds elapsed ${i}`),
阅读全文
摘要:We need to give structure to our application with logic and effects. This lessons shows how we can organize our code into two parts: main() function f
阅读全文
摘要:The guiding principle in Cycle.js is we want to separate logic from effects. This first part here was logical, and this second part here was effects. ...
阅读全文