Book Image

Reactive Programming with JavaScript

By : Jonathan Hayward
Book Image

Reactive Programming with JavaScript

By: Jonathan Hayward

Overview of this book

<p>Reactive programming is carried out using the building blocks of functional programming. JavaScript libraries such as ReactJS are used for front-end web development that is both competent and powerful. ReactJS is intensively being used to develop webapps for Facebook.</p> <p>This title is among the first of those addressing how everyday programmers can take advantage of reactive programming without having an extremely heavy mathematical background. It starts with the basics a front-end developer can easily connect with, while also covering the basics of functional programming. Then it goes on to explain non-functional reactive programming with the help of a live example. After that it gives a theoretical overview of reactive programming supported by functional programming. Tools to make functional programming easier like Bacon.js, a library like jQuery, are also covered. Finally, it finishes with building one small and one larger front-end project.</p>
Table of Contents (20 chapters)
Reactive Programming with JavaScript
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Demonstrating Functional Reactive Programming in JavaScript with a Live Example Part II – A To-do List
Index

A render() method can easily delegate


The (outer) render function, is more of a wrapper than a workhorse. It displays the fields for a one-time calendar entry that belongs to both one-time calendar entries and series. Additionally, if the calendar entry that is on the operating table is a recurring calendar entry (which will be true only if the checkbox that indicates a recurring calendar entry is checked), this function includes the added form elements that are appropriate for a recurring calendar entry:

Tip

The JSX syntax is surprisingly forgiving. However, it does have some rules, and they are enforced with descriptive error messages, including that if there are multiple elements, they need to be wrapped in an enclosing element. So, you do not write <em>Hello</em>, <strong>world</strong>!. Instead, you write <span><em>Hello</em>, <strong>world</strong>!</span>. But given a few other ground rules, JSX will do the right thing for...