Guest User

Untitled

a guest
May 8th, 2020
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React from 'react';
  2. import '../css/App.css';
  3.  
  4. export default class App extends React.Component {
  5.   constructor(props)
  6.   {
  7.     super(props);
  8.     this.state = {
  9.       taskArray: []
  10.     }
  11.   }
  12.  
  13.   render() {
  14.     return (
  15.       <div>
  16.         {this.state.taskArray}
  17.       </div>
  18.     )
  19.   }
  20. }
  21.  
  22. class Task extends React.Component {
  23.   constructor(props) {
  24.     super(props);
  25.     this.state = {
  26.       value: props.value
  27.     }
  28.   }
  29.  
  30.   render() {
  31.     return (
  32.       <div>
  33.         {this.state.value}
  34.       </div>
  35.     )
  36.   }
  37. }
RAW Paste Data