Basics taken from https://gist.github.com/asabaylus/3071099
Table of Contents
import React, { Component } from 'react'; | |
import { | |
HashRouter, | |
Route, | |
Link, | |
Switch, | |
} from 'react-router-dom'; | |
import './App.css'; |
// This is something we could possibly do more safely | |
const RenderIfTrue = function ({ shouldRender, children }) { | |
var ToRender = children; | |
if (shouldRender) { | |
return <ToRender />; | |
} else { | |
return null; | |
} | |
}; // End <RenderIfTrue> |
Basics taken from https://gist.github.com/asabaylus/3071099
Table of Contents
/** | |
* All benefit programs' return value should be an instance of this class. | |
* | |
* @todo Implement `.expirationDate` to keep track of data that needs updating | |
* @todo Figure out how to access this jsdoc definition externally. | |
* | |
* @external | |
* | |
* @class | |
* @param {object} trial - Data to try out/validate |
/** A way to stay aware of when any code used in this script will expire. | |
* For example, if dataObj1 is only valid till June 1, 2017, then | |
* this script should only be valid till then. After that the code | |
* should be changed to point to a new, valid, object. | |
* @exports {Date} expirationDate | |
*/ | |
var expirationDate = new Date( 2018, 12, 31 ); | |
// or it could calculate the expiration date based on all the objects it's pulling in | |
var calcExpirationDate = function() { |