BAEL-4842 - Use React and Spring Boot to Build a Simple CRUD App
Initial source module for the article
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import React, {Component} from 'react';
|
||||
import {Navbar, NavbarBrand} from 'reactstrap';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
export default class AppNavbar extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {isOpen: false};
|
||||
this.toggle = this.toggle.bind(this);
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.setState({
|
||||
isOpen: !this.state.isOpen
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return <Navbar color="dark" dark expand="md">
|
||||
<NavbarBrand tag={Link} to="/">Home</NavbarBrand>
|
||||
</Navbar>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user