MCPcopy Create free account
hub / github.com/SuboptimalEng/coding-tutorials / maybeAddToDo

Function maybeAddToDo

react-redux-todo/src/App.tsx:24–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 const [toDo, setToDo] = useState('');
23
24 const maybeAddToDo = () => {
25 if (toDo.length > 0) {
26 dispatch(reduxAddToDo(toDo));
27 }
28 };
29
30 // NOTE: Check how app is done with hooks
31 // return <AppWithReactHooks></AppWithReactHooks>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected