title: Firebase - storage images on form submit. React JS
body: <p>I'm trying to upload image to firebase storage with this code:</p>
  
  <pre><code>const firebase = useFirebase();
        const handleSubmit = e =&gt; {
          e.preventDefault();
         // state.title &amp;&amp; dispatch(createItems(state));
  
          firebase
            .storage()
            .ref(`images/${state.title}`)
            .child(state.title)
            .getDownloadURL()
            .then(url =&gt; setState({ ...state, avatarURL: url }));
        };
  </code></pre>
  
  <p>And it's not working. Almost the same code works fine with react-firebase-file-uploader. Does any anyone has idea why? </p>
  
  <p>Thanks!</p>