React

by dj19910501

HTML

<div id="app"></div>

CSS

body {
  background: #20262E;
  padding: 20px;
  font-family: Helvetica;
}

#app {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  transition: all 0.2s;
}

li {
  margin: 8px 0;
}

h2 {
  font-weight: bold;
  margin-bottom: 15px;
}

.done {
  color: rgba(0, 0, 0, 0.3);
  text-decoration: line-through;
}

input {
  margin-right: 5px;
}

React

class TodoApp extends React.Component {
  constructor(props) {
    super(props);
    const data = '{"optionChain":{"result":[{"underlyingSymbol":"BA","expirationDates":[1551398400,1552003200,1552608000,1553212800,1553817600,1554422400,1555545600,1558051200,1561075200,1563494400,1565913600,1579219200,1610668800],"strikes":[235.0,250.0,260.0,265.0,270.0,280.0,285.0,290.0,295.0,300.0,305.0,310.0,312.5,315.0,317.5,320.0,322.5,325.0,327.5,330.0,332.5,335.0,337.5,340.0,342.5,345.0,347.5,350.0,352.5,355.0,357.5,360.0,362.5,365.0,367.5,370.0,372.5,375.0,377.5,380.0,382.5,385.0,387.5,390.0,392.5,395.0,397.5,400.0,402.5,405.0,407.5,410.0,412.5,415.0,417.5,420.0,422.5,425.0,427.5,430.0,432.5,435.0,437.5,440.0,442.5,445.0,447.5,450.0,452.5,455.0,457.5,460.0,465.0,470.0,475.0],"hasMiniOptions":false,"quote":{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","regularMarketPrice":440.28,"regularMarketTime":1551382475,"regularMarketChange":4.8399963,"regularMarketOpen":438.7,"regularMarketDayHigh":441.36,"regularMarketDayLow":437.09,"regularMarketVolume":3426640,"trailingAnnualDividendRate":6.84,"trailingPE":24.665546,"regularMarketChangePercent":1.1115185,"regularMarketPreviousClose":435.44,"bid":440.79,"marketState":"REGULAR","sharesOutstanding":564985024,"bookValue":0.597,"fiftyDayAverage":388.39352,"fiftyDayAverageChange":51.886475,"forwardPE":18.847603,"fiftyDayAverageChangePercent":0.13359253,"twoHundredDayAverage":357.45636,"twoHundredDayAverageChange":82.82364,"twoHundredDayAverageChangePercent":0.2317028,"marketCap":248751603712,"priceToBook":737.4874,"priceHint":2,"regularMarketDayRange":"437.09 -...