<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ooo2003003v2</title>
    <description>The latest articles on DEV Community by ooo2003003v2 (@ooo2003003v2).</description>
    <link>https://dev.to/ooo2003003v2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F226337%2Fd0dcd656-312a-4201-8c70-ec5740581a16.png</url>
      <title>DEV Community: ooo2003003v2</title>
      <link>https://dev.to/ooo2003003v2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ooo2003003v2"/>
    <language>en</language>
    <item>
      <title>How do i use js file function in componentDidMount????</title>
      <dc:creator>ooo2003003v2</dc:creator>
      <pubDate>Mon, 09 Sep 2019 09:21:38 +0000</pubDate>
      <link>https://dev.to/ooo2003003v2/how-do-i-use-js-file-function-in-componentdidmount-jjb</link>
      <guid>https://dev.to/ooo2003003v2/how-do-i-use-js-file-function-in-componentdidmount-jjb</guid>
      <description>&lt;p&gt;Hello there.&lt;br&gt;
I have a problem. I have some functions in a js file and i wanna use it in my react js project. I referenced it in the head but when i call a of the function in the js file in componentDidMount it shows "'InitInput' is not defined no-undef"&lt;br&gt;
Does anyone has a solution for my problem???&lt;br&gt;
Thx&lt;/p&gt;

&lt;p&gt;Input.jsx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Input extends React.Component {
  constructor(props) {
    super(props);
    this.myRef = React.createRef();

  }
  componentDidMount() {($(this.myRef ))
  }
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;initInput.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function InitInput(form){

alert()

}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Index.html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
 &amp;lt;script src="/jQuery/jquery-3.4.1.min.js" &amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script  src="/jQuery/initInput.js" &amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
...
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>react</category>
    </item>
  </channel>
</rss>
