Guest User

Untitled

a guest
Nov 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. import React, { Component } from 'react'
  2. import { graphql } from 'react-blips'
  3.  
  4. import { TodoList } from '../../components'
  5.  
  6. import {
  7. allTodosQuery,
  8. createTodoMutation,
  9. updateTodoMutation,
  10. } from './operations'
  11.  
  12. class App extends Component {
  13. render() {
  14. const { data: { loading, allTodos = [] } } = this.props
  15. return (
  16. <div>
  17. <h1>Todos:</h1>
  18. {loading ? <p>Loading...</p> : <TodoList todos={allTodos} />}
  19. </div>
  20. )
  21. }
  22. }
  23.  
  24. export default graphql(allTodosQuery, createTodoMutation, updateTodoMutation)(App)
Add Comment
Please, Sign In to add comment