Plain old JavaScript objects are all you need

Let's take a look at the following code:

    new_entry: function() {
      var result = {};
      result.hours = 12;
      result.minutes = 0;
      result.month = new Date().getMonth();
      result.date = new Date().getDate();
      result.year = new Date().getFullYear();
      result.weekday = new Date().getDay();
      result.description = '';
      return result;
    },

For one-time calendar entries, the fields are used just as you might expect. For series of calendar entries, the date becomes not the time when the calendar entry occurs, but the time when it starts. The user interface offers several ways that you might narrow down when a calendar entry occurs. This can be said to be every first, Tuesday only, and for a particular month. Every selection that ...

Get React: Building Modern Web Applications 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.