-
Couldn't load subscription status.
- Fork 0
Routing #16
base: master
Are you sure you want to change the base?
Routing #16
Conversation
| import { Navbar } from './Navbar'; | ||
|
|
||
| it('renders without crashing', () => { | ||
| const div = document.createElement('div'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't something like const footer = create(<Footer />); also work instead of rendering into the DOM?
| margin-bottom: 100px; | ||
| `; | ||
|
|
||
| const navigationLink = css` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class variables should be named consistently, so better to add the Class suffix here also
|
|
||
| const About: React.FC<{}> = () => { | ||
| const [title, setTitle] = React.useState(''); | ||
| const [content, setContent] = React.useState(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also handle the loading and error states. That's quite simple with the useAsync hook from react-use
Navbarcomponent & related basic testAboutcontainer component & related testHomecontainer component & related testreact-routerexample with lazy loading routeuseEffecthook and API call with local state update