We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent daf9d75 commit 94ee613Copy full SHA for 94ee613
frameworks/keyed/react-hooks/src/main.jsx
@@ -55,8 +55,8 @@ function listReducer(state, action) {
55
const GlyphIcon = <span className="glyphicon glyphicon-remove" aria-hidden="true"></span>;
56
57
const Row = memo(({ selected, item, dispatch }) => {
58
- const select = useCallback(() => dispatch({ type: 'SELECT', id: item.id }), []),
59
- remove = useCallback(() => dispatch({ type: 'REMOVE', id: item.id }), []);
+ const select = useCallback(() => dispatch({ type: 'SELECT', id: item.id }), [item.id]),
+ remove = useCallback(() => dispatch({ type: 'REMOVE', id: item.id }), [item.id]);
60
61
return (<tr className={selected ? "danger" : ""}>
62
<td className="col-md-1">{item.id}</td>
0 commit comments