title: Fetch Single Data by Document Id Reactjs Firebase Web SDK 9
body: <p>I want to fetch the data from single document by selected ID. I have try with function &quot;child&quot; and &quot;orderByChild&quot; but it seems did not work with web SDK 9. Could you please to help with the new format query of web version 9.
  Below is my code at table database:</p>
  <pre><code>&lt;Link to={`/view/${id}`}&gt;
      {id.data.dateCreate}
  &lt;/Link&gt;
  </code></pre>
  <p>And the code in &quot;View&quot; page:</p>
  <pre><code>const [user, setUser] = useState({});
  const { id } = useParams();
  useEffect(() =&gt; {
      db
        .orderByChild(`reports/${id}`)
        .get()
        .then((snapshot) =&gt; {
          if (snapshot.exists()) {
            setUser({ ...snapshot.val() });
          } else {
            setUser({});
          }
        });
    }, [id]);
  </code></pre>
  <p>Thank you so much for your help!</p>