Skip to content

Instantly share code, notes, and snippets.

@charbelrami
Last active January 7, 2019 17:53
Show Gist options
  • Save charbelrami/c5fc887cacb80be6cf8964a5c140de60 to your computer and use it in GitHub Desktop.
Save charbelrami/c5fc887cacb80be6cf8964a5c140de60 to your computer and use it in GitHub Desktop.
Interface
import React from 'react';
import useTodo from '../logic-hooks/useTodo';
import TodoInput from '../components/TodoInput';
import TodoList from '../components/TodoList';
export default function TodoInterface() {
const { todos, newTodo, setNewTodo, addTodo } = useTodo();
return (
<>
<TodoInput newTodo={newTodo} setNewTodo={setNewTodo} addTodo={addTodo} />
<TodoList todos={todos} />
</>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment