title: Why the initial loading state is set to true while using useState?
body: <p>I'm confused why the <code>isLoading</code> flag is set to <strong>true</strong> in the initial state. Isn't it supposed to be <strong>false</strong> initially? Consider this simple example:</p>
  <pre class="lang-js prettyprint-override"><code>const SearchCharity = () =&gt; {
    const [isLoading, setIsLoading] = useState(true)
    const [themes, setThemes] = useState([])
  
    useEffect(() =&gt; {
      const fetchThemes = async () =&gt; {
        try {
          setIsLoading(true)
  
          const result = await axios.get(url)
          setThemes(result.data.themes.theme)
  
          setIsLoading(false)
        } catch (err) {
          console.log(err)
        }
      }
      fetchThemes()
    }, [])
  
    return (
        {
          isLoading ? &lt;h1&gt;Loading......&lt;/h1&gt; : &lt;h1&gt;Display Content&lt;/h1&gt;
        }
      )
  
  export default SearchCharity
  </code></pre>
  <p>Another thing it, if we set it to <code>true</code> or <code>false</code> initially in the above code, the <code>useEffect</code> still runs the same and the result on the screen will also be the same. So, why <code>true</code>? Is this some sort of standard?</p>