-
Notifications
You must be signed in to change notification settings - Fork 55
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
To-Do App #36
base: main
Are you sure you want to change the base?
To-Do App #36
Conversation
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.
Well-defined Zustand store and nice that you implemented local storage as well! Have a look at the persist middleware for another time.
Keep up the good work!
@@ -0,0 +1,46 @@ | |||
.app-container { | |||
display: flex; |
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.
Seems like all of your code has too much indentation? Set your VSC to be 2 spaces please
const moveTaskUp = useTaskStore((state) => state.moveTaskUp); | ||
const moveTaskDown = useTaskStore((state) => state.moveTaskDown); |
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.
Nice addition!
function loadTasksFromLocalStorage() { | ||
const savedTasks = localStorage.getItem(LOCAL_STORAGE_KEY); | ||
return savedTasks ? JSON.parse(savedTasks) : null; | ||
} | ||
|
||
// Save tasks to localStorage | ||
function saveTasksToLocalStorage(tasks) { | ||
localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(tasks)); | ||
} |
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.
Why not arrow functions here? 👀
Great job with your typescript implementation all requirements met ⭐️, I've checked your code in your repo but cannot see that here in the PR. Doesnt matter, but thats why I'm adding this comment here. I can't comment on your own repo, only the PR |
https://helenes-todolist.netlify.app/