daily pastebin goal
2%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 49 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. import { observer } from 'mobx-react';
  2. import * as React from 'react';
  3. import { AppViewModel } from './AppViewModel';
  4. @observer class App extends React.Component< {model: AppViewModel} ,{}> {
  5.  
  6.   public render() {
  7.     return (
  8.       <div>
  9.         <button onClick={this.props.model.refresh} >Refresh List</button>
  10.         <button onClick={this.props.model.clearData} >Clear List</button>
  11.  
  12.         <ol>
  13.           {
  14.             this.props.model.items
  15.             .map(item => {
  16.               return (
  17.                 <li key={item.name}>
  18.                   <ul>
  19.                     <li>Name: {item.name}</li>
  20.                     <li>Description: {item.description}</li>
  21.                     <li>Link: <a href={item.html_url}>Link</a></li>
  22.                   </ul>
  23.                 </li>
  24.               );
  25.             })
  26.           }
  27.         </ol>
  28.       </div>
  29.     );
  30.   }
  31. }
  32.  
  33. export default App;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top