-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teuku muhammad ammar #6
base: main
Are you sure you want to change the base?
Teuku muhammad ammar #6
Conversation
<> | ||
<div> | ||
<TodoList /> | ||
</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.
ini pilih aja satu, mau pake fragment atau pake div untuk ngebungkus jadi 1 parent element
@@ -0,0 +1,14 @@ | |||
import './App.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.
jangan lupa import React !!!
<> | ||
<div> | ||
{todos.map((todo, index) =>( | ||
<div className={todo.isComplete ? 'todo-row complete' : 'todo-row'} | ||
key={index} > | ||
<div className = "text-dark" key={todo.id} onClick={() => completeTodo(todo.id)}> | ||
{todo.text} | ||
</div> | ||
<div className="icons"> | ||
<RiCloseCircleLine | ||
onClick={() => removeTodo(todo.id)} | ||
className = 'delete-icon' | ||
/> | ||
<TiEdit | ||
onClick={() => setEdit({id : todo.id, value: todo.text})} | ||
className = 'edit-icon' | ||
/> | ||
</div> | ||
</div> | ||
))} | ||
</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.
sudah di bungkus div, tidak perlu dibungkus fragment lagi
No description provided.