use reducer

=


useCallback in React vs Methods in Vue

  • React’s useCallback is used to memoize functions so that they don’t get recreated on every render.
  • In Vue, methods are naturally cached between re-renders and only redefined if dependencies within the component change, so you don’t need an equivalent to useCallback.

Example in Vue:

javascript
export default { methods: { fetchData() { console.log("Fetching data..."); } } 

}


No comments:

Post a Comment

sun dried potato procedure

  Sun-Dried Potato Chips Recipe  https://www.youtube.com/watch?v=e_PVvAU77Qs , recipe for potato sun dried chips 1) ist peel off the potato ...