Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jacquelinekellyhunt
Copy link

@jacquelinekellyhunt jacquelinekellyhunt commented Nov 22, 2024

https://do-it-to-do.netlify.app/

Still figuring out the global state:'(

Copy link
Contributor

@HIPPIEKICK HIPPIEKICK left a 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.

Comment on lines +104 to +133
<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>
Copy link
Contributor

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

@jacquelinekellyhunt
Copy link
Author

@HIPPIEKICK I hope this will resolve the last required changes :'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants