I\'m trying to render a div
on the same page when the user clicks on a link.
My HTML page:
Stores&l
You can also change a classname and style in CSS.
// outside render
const NORMAL = "row account stores"
const HIDDEN = NORMAL + " hidden"
// In render
render: function() {
return(
a lot more divs
);
}
Note that it is generaly better to not use double curly braces {{ in render function as you are often creating a new object on every render execution. for example:
{display: true ? 'block' : 'none' } === {display: true ? 'block' : 'none' } // false
// outside render
const BLOCK = {diplay: 'block'}
const NONE= {diplay: 'none'}
// in render
{this.state.showStore ? BLOCK : NONE}