Why my browser give me a syntax error about a div?

94 Views Asked by At

Browser give me this error enter image description here What I'm doing wrong? This appeared only when I added the code for the loader

    function App(){
     const [loading, setLoading] = useState(false);
        
        useEffect(() => {
          setLoading(true)
          setTimeout(() => {
            setLoading(false)
          }, 5000)
        }, [])
        
        
          return (
            <div className="App">
        {
                loading ? 
                <img src={loader} alt=""
                loading={loading}
                />
              :
         //all my code
     
    }
     </div>
)}
0

There are 0 best solutions below