🐝 Write senior-level code, faster!

preview_player
Показать описание
It's easy to get bogged down in refactors and clean-up. Here's why I suggest "beelining" to a solution SOONER to write reliable code with fewer mistakes.

#programming #webdevelopment #tutorial #beginner #education
Рекомендации по теме
Комментарии
Автор

Awesome as always! What I do (I don't do it often but I should do it more often 😅) is writing test/it blocks in a test file. e.g.

```
describe('LoginComponent', () => {
describe('when user is unauthenticated', () => {
it('should render the component')
it('should have submit button disabled')
it('checks for validations')
it('enables submit only after validations pass')
it('disables submit button on login request')
it('redirects to home after login')
})

describe('when user is authenticated', () => {
it('redirects back to home page')
})

describe('state management on user actions', () => {
it ('resets when navigating away')
it ('set errors obj on wrong credentials')
})
})
```

This allows me to remember and basically plan the things that I have to do. Kinda like TDD but without writing the tests, only the blocks with their description/title

_the_one_