x64Bits / todo-app

Home Page:todo-app-luxxuz.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggestion IF instead short-circuit

x64Bits opened this issue · comments

To further promote readability and indicate your intent I suggest that when the condition is not complicated and does not require a lower value of the condition to use:

Block condition

if(condition) {
     fetchData()
}

Instead of:

Short-circuit condition
condition && fetchData()

File: https://github.com/x64Bits/todo-app/blob/main/src/components/Todo/index.jsx#L57