What I want is to add here one script and when it will ReactDom.render, add it to the dom and... run it too. But it doesnt run it even tho i can see it in the dom. This is a piece of code, I am using the reactdom.render in another file.
var React = require('react');
var List = require('./list.js');
var Header = React.createClass({
render:function(){
return (
<div className='header'>
<List/>
<input id='keywords' type='text' placeholder='SEARCH' name="keyword" maxLength="30" />
<button title='Search' alt='Search Button' />
<script src='./scripts/jquery/send_keyword.js' ></script>
</div>
);
}
});
module.exports = Header;
I tried to use the 'src' both from this file perspective (../jquery/send_keyword.js) and from my index.php perspective (like in the example above). PS: When I add it directly from index.php the javascript file is running but I try to have the index.php file clear so I add html things with reactjs to practice it.... something missing herE???
Nevermind I used the script through the index.php and not render it from reactjs