Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from 'react'
- import { graphql } from 'react-blips'
- import { TodoList } from '../../components'
- import {
- allTodosQuery,
- createTodoMutation,
- updateTodoMutation,
- } from './operations'
- class App extends Component {
- render() {
- const { data: { loading, allTodos = [] } } = this.props
- return (
- <div>
- <h1>Todos:</h1>
- {loading ? <p>Loading...</p> : <TodoList todos={allTodos} />}
- </div>
- )
- }
- }
- export default graphql(allTodosQuery, createTodoMutation, updateTodoMutation)(App)
Add Comment
Please, Sign In to add comment