I have a react component that uses some hooks. The component will call hooks with parameters and get a value back.
Is there a way to only execute the hook if the parameter is different from the previous value just like how we can use React.memo()
on the component itself and avoid rerendering if the props are the same?