How to use the react-tracked.trackMemo function in react-tracked

To help you get started, we’ve selected a few react-tracked examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dai-shi / react-tracked / examples / 09_reactmemo / src / TodoItem.tsx View on Github external
const TodoItem: React.FC = ({ todo }) => {
  trackMemo(todo);
  const dispatch = useDispatch();
  return (
    <li>
      numRendered: {++numRendered}
      <input checked="{todo.completed}" type="checkbox"> dispatch({ type: 'TOGGLE_TODO', id: todo.id })}
      /&gt;
      <span style="{{">
        {todo.title}
      </span></li>

react-tracked

State usage tracking with Proxies. Optimize re-renders for useState/useReducer, React Redux, Zustand and others.

MIT
Latest version published 10 days ago

Package Health Score

83 / 100
Full package analysis