I spent a while toying around with react-boilerplate, reading the docs, searching the web etc. I built up some simple components and containers no problem.
I have a large amount of code that creates DOM nodes and returns them using javascript. For a simple example
function makeSomething(){
let div = document.createElement('div');
div.innerHTML = 'where would this go in reactjs boilerplate';
return div
}
My code does a ton of DOM manipulation, adding table rows, deleting rows and columns, moving rows, fetching data from remote sources. It is all written in javascript except for ajax calls which use jquery.
My question is how do I call and place the returned nodes into a container?
here is a simplified example of trying to add a js created node in a container:
export default class VendorsPage extends React.Component { // eslint-disable-line react/prefer-stateless-function
// Since state and props are static,
// there's no need to re-render this component
shouldComponentUpdate() {
return false;
}
renderdiv(){
let div = document.createElement('div');
div.innerHTML = 'hi there'
return div
}
render() {
return (
//how do I put renderdiv in here
);
}
}