SHARE
TWEET

U3 Artículo1 SE4

raulghm Feb 17th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. changeStateSection(section) {
  2.     this.setState({ section });
  3.   }
  4.  
  5.   showSections() {
  6.     if (this.state.section === 'todoList') {
  7.       return <TodoList />;
  8.     }
  9.  
  10.     return <AddTodo />;
  11.   }
  12.  
  13.   pickButton() {
  14.     if (this.state.section === 'todoList') {
  15.       return (
  16.         <Button
  17.           onPress={() => { this.changeStateSection('addTodo'); }}
  18.           title="Add Todo"
  19.         />
  20.       );
  21.     }
  22.  
  23.     return (
  24.       <Button
  25.         onPress={() => { this.changeStateSection('todoList'); }}
  26.         title="Cancel"
  27.       />
  28.     );
  29.   }
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