Navigation.js 922 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * React Static Boilerplate
  3. * https://github.com/koistya/react-static-boilerplate
  4. *
  5. * Copyright © 2015-2016 Konstantin Tarkus (@koistya)
  6. *
  7. * This source code is licensed under the MIT license found in the
  8. * LICENSE.txt file in the root directory of this source tree.
  9. */
  10. import React from 'react';
  11. import { Link } from 'react-app';
  12. class Navigation extends React.Component {
  13. componentDidMount() {
  14. window.componentHandler.upgradeElement(this.refs.root);
  15. }
  16. componentWillUnmount() {
  17. window.componentHandler.downgradeElements(this.refs.root);
  18. }
  19. render() {
  20. return (
  21. <nav className="mdl-navigation" ref="root">
  22. <Link className="mdl-navigation__link" to="/">Home</Link>
  23. <Link className="mdl-navigation__link" to="/about">About</Link>
  24. <Link className="mdl-navigation__link" to="/not-found">Not Found</Link>
  25. </nav>
  26. );
  27. }
  28. }
  29. export default Navigation;