Promise in React doesn’t set the state of a variable and the parent component can not reach it

I have the next code:

 const handleClick =  async (e) => {
        e.preventDefault();

        
        
        rezultat1 = fetchPretraga()

        .then(setRez)
        .then(() => {
            navigate('/lista');
        });

    }

I also have this


const handleClick =  async (e) => {
        e.preventDefault();

    
        svojstva1 = fetchSvojstva()
        
        .then(setSv)
        .then(() => {
            navigate('/proizvod');
        });
   
    }

The upper code does not work when I have the navigate in it (when i remove it, it works, but i need it to replace the route). The lower code is the same, but this one works, it sets the state and the parent component can use the variable.

How is this possible?