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

Clarify CategoryForm component #3

Open
redrambles opened this issue May 25, 2023 · 0 comments
Open

Clarify CategoryForm component #3

redrambles opened this issue May 25, 2023 · 0 comments

Comments

@redrambles
Copy link
Contributor

<select id='category' name='category' value={category} onChange={handleCategoryChange}>
          {categories.map((category) => (
            <option key={category} value={category}>
              {category}
            </option>
          ))}
        </select>

Should be:

        <select id='category' name='category' value={category} onChange={handleCategoryChange}>
          {categories.map((category-item) => (
            <option key={category-item} value={category-item}>
              {category-item}
            </option>
          ))}
        </select>

To help differentiate from the category prop that is the state passed by App.js, and the element that we are iterating over from the categories array. This change will need to be made in branch 4 (filter) and onward.

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

No branches or pull requests

1 participant