CodeYourFuture / CodeYourFuture/React-Module-Project
Feature Search onSubmit
- 主要语言
- JavaScript
- 星标
- 1
- 派生
- 28
- PR 合并指标
- 30 天内没有已合并 PR
描述
### 18. Triggering search when submitting the form
Depends on #17
**Instructions:**
Still in the `` component, add a `onSubmit` handler to the `` tag. When the form is submitted (try clicking the search button), get the value of the state `searchInput` and pass it as a parameter to the `search` prop function that has been provided for you (the `search` prop is passed from the `` component).
**Note:** Your submit handler should take an `event` parameter and add the line `event.preventDefault()` to prevent the browser from implicitly submitting the form
**Test:**
Given a searchInput field with input values entered
When the form is submitted
Then the value of searchInput is passed as a parameter to search
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。