Conversation
| import Timer from './components/Timer' | ||
| import Error from './components/Error'; | ||
| import Navigation from './components/Navigation'; | ||
| import 'bootstrap/dist/css/bootstrap.min.css'; |
There was a problem hiding this comment.
Use styled components instead of importing stylesheets
There was a problem hiding this comment.
Bootstrap styled is not supported with typescript
There was a problem hiding this comment.
I will style components a different way
| console.log(timer) | ||
| } | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
You can turn this entire useEffect into it's own custom hook. Then call it both in Timer and Stopwatch
There was a problem hiding this comment.
it differs between the two however, i guess i can rewrite it to take in a up or down or something from state??? maybe??
There was a problem hiding this comment.
It's good to turn hooks into something that is generic so that you can reuse them between components. It also lets you test then outside of the component that uses them.
End of day, we want to use hooks because it allows us to separate code that is presentational and code that contains "business logic" as well as test them independently of each other.
No description provided.