I'm trying to have a page that switches out which component is rendered based off of a pair of navigation buttons. The page is set up like this
ReactDOM.render(<Logo/>, document.getElementById('logo'));
ReactDOM.render(<Upload/>, document.getElementById('main'));
ReactDOM.render(<NavButtons/>, document.getElementById('nav_buttons'))
ReactDOM.render(<Footer />, document.getElementById('footer'));
The <Upload/> component is the one I wish to cycle out. So when the user pressed the 'next' navigation button a different component would then be loaded on the page.
How do you go about this? Am I attacking this problem correctly? I am new to react so trying to figure out the best way to utilize it.
Ended up using both answers below for different use cases. Both work to accomplish this though.