-
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
Week 15: To do app #30
base: main
Are you sure you want to change the base?
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.
Hi Kelly! You're off to a really good start this week and your Zustand store has been nicely set up. Next step is to get rid of the prop drilling and implement the functions you've defined in your store instead.
Changes required
- Use Zustand for global state management instead of passing props
Other things to just think about going forward
- Don't forget to add labels to form elements
- If you're struggling with the weekly topic, try focusing on that more than stretch goals (however, it's nice that you're challening yourself with thas as well).
- Another thing I'd like to ask you is to stay consistent with whether or not you're using arrow functions or the function keyword.
<Select | ||
value={category} | ||
onChange={(e) => setCategory(e.target.value)} | ||
> | ||
<option value="">Select a Category</option> | ||
{availableCategories.map((cat, index) => ( | ||
<option key={index} value={cat}> | ||
{cat} | ||
</option> | ||
))} | ||
</Select> | ||
)} | ||
<Input | ||
type="text" | ||
placeholder="Category" | ||
value={category} | ||
onChange={(e) => setCategory(e.target.value)} | ||
/> | ||
<Input | ||
type="text" | ||
placeholder="Task" | ||
value={task} | ||
onChange={(e) => setTask(e.target.value)} | ||
/> | ||
<Input | ||
type="date" | ||
value={date} | ||
onChange={(e) => setDate(e.target.value)} | ||
/> | ||
<SubmitButton onClick={handleSubmit}>Add Task</SubmitButton> |
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.
Don't forget the form element as well as labels for form elements. This will improve accessibility
@HIPPIEKICK I hope this will resolve the last required changes :')) |
https://do-it-to-do.netlify.app/
Still figuring out the global state:'(