score:0

I read up on preventing re-renderings here: https://github.com/facebook/react/issues/15156

following the 3rd option example

function Button() {
  let appContextValue = useContext(AppContext);
  let theme = appContextValue.theme; // Your "selector"

  return useMemo(() => {
    // The rest of your rendering logic
    return <ExpensiveTree className={theme} />;
  }, [theme])
}

could you try something like the following:

Link Hover Component

const PhotoLink = ({ data }) => {
const {setImage} = useContext(CursorContext)
let image = setImage.data


Related Query

More Query from same tag