Guest User

Untitled

a guest
Dec 13th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. // withNavBar.js - HOC
  2. import React from "react";
  3. import NavBar from "../components/navBar";
  4.  
  5. const styles = {
  6. root: {
  7. flexGrow: 1
  8. }
  9. };
  10.  
  11. export default Page => {
  12. return class PageWithHeader extends React.Component {
  13. render() {
  14. return (
  15. <div style={styles.root}>
  16. <NavBar />
  17. <Page {...this.props} />
  18. </div>
  19. );
  20. }
  21. };
  22. };
Add Comment
Please, Sign In to add comment