The increaseSecondState function is re-rendering the child component even when i didn't pass it as a prop to the child component

I didnt expect the child component to re-render because i didnt pass the increaseSecondState function as a prop to the child component. Because we all know after using React.memo on the child component, the only way it can re-render is if only its prop changes. import React, { useState, useCallback } from ‘react’ import Child… Read More The increaseSecondState function is re-rendering the child component even when i didn't pass it as a prop to the child component

how to stop re-rendering of child component if parent update the context or state in react js?

how to stop re-rendering of child component if parent update the context or state in react js ? I am already using React.memo still it is re-rendering. this is my child component const Ab = () => { console.log("—ff-ddd"); const pageContext = useContext(PageContext); useEffect(() => { setTimeout(() => { pageContext.updateGlobalMenu({}); }, 5000); }, []); return… Read More how to stop re-rendering of child component if parent update the context or state in react js?

Argument of type 'string' is not assignable to parameter of type 'Pick<IJobs, "name">'

Why I get this error? Argument of type ‘string’ is not assignable to parameter of type ‘Pick<IJobs, "name">’. Type ‘string’ is not assignable to type ‘Pick<IJobs, "name">’ mockData: export const Jobs: IJobs[] = [ { id: ‘1’, name: ‘Trader’, available: true }, { id: ‘2’, name: ‘Seller’, available: true }, { id: ‘3’, name: ‘Manager’,… Read More Argument of type 'string' is not assignable to parameter of type 'Pick<IJobs, "name">'