摘要:
Our application was able to produce write effects, through sinks, and was able to receive read effects, through the DOM sources. However, the main fun 阅读全文
摘要:
Clean TodoApp Component, it doesn't need to receive any props from the top level component: const TodoApp = () => ( <div> <AddTodo /> <VisibleTodoList 阅读全文
摘要:
Code to be refactored: const AddTodo = ({ onAddClick }) => { let input; return ( <div> <input ref={node => { input = node; }} /> <button onClick={() = 阅读全文
摘要:
Code to be refacted: const TodoList = ({ todos, onTodoClick }) => ( <ul> {todos.map(todo => <Todo key={todo.id} {...todo} onClick={() => onTodoClick(t 阅读全文
摘要:
The CSS :not() selector allows us to exclude a subset of elements matched by our selector. In this example we refactor two selectors down to one using 阅读全文