Skip to content
Snippets Groups Projects
Commit 5cd5449f authored by Martin Wighus Holtmon's avatar Martin Wighus Holtmon
Browse files

projectFirstPart/Problem4 - moved rendering of the header out to the dom

parent ef1b5ca1
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,6 @@ class P4 extends React.Component { ...@@ -17,7 +17,6 @@ class P4 extends React.Component {
render() { render() {
return( return(
<div> <div>
<Header />
<button type="button" onClick={this.handleButtonClick}>Switch to {this.state.nextPage.name}</button> <button type="button" onClick={this.handleButtonClick}>Switch to {this.state.nextPage.name}</button>
<this.state.activePage /> <this.state.activePage />
</div> </div>
...@@ -26,6 +25,9 @@ class P4 extends React.Component { ...@@ -26,6 +25,9 @@ class P4 extends React.Component {
} }
ReactDOM.render( ReactDOM.render(
<P4/>, <>
<Header />
<P4 />
</>,
document.getElementById('reactapp'), document.getElementById('reactapp'),
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment