UNPKG

atom-react

Version:

An opiniated way to use ReactJS in a functional way in plain old Javascript, inspired by popular Clojurescript wrappers like Om

14 lines (11 loc) 388 B
'use strict'; var Preconditions = require("./utils/preconditions"); var AtomReactEvent = function(eventName,eventData) { Preconditions.checkHasValue(eventName,"Event name/type is mandatory"); this.name = eventName; this.type = eventName; this.data = eventData; this.payload = eventData; this.timestamp = new Date().getTime(); }; module.exports = AtomReactEvent;