Feature Search State
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 65/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, react
- 領域
- frontend
研究方向
開啟 src/Search.js,檢查客戶姓名輸入欄位及其周圍的元件。新增所要求的 searchInput 狀態和輸入處理常式,然後確認輸入內容會更新欄位,並使用 console.log() 記錄輸入的值。
由索引模型根據 Issue 內容生成。
描述
Storing the search input in a state
Instructions:
Implement the functionality to search for a customer name given the text typed into the customer name field.
In the src/Search.js file, declare a new state variable named searchInput with the corresponding setter function setSearchInput (hint: use the React function useState). The initial value of the searchInput variable can be an empty string. Add a value property to the <input> tag that is set to the new searchInput state variable.
Create a new function handleSearchInput taking an event parameter. This function should use the setSearchInput function to update the state variable searchInput with what the user typed in the input field. Finally, add a onChange prop to the <input> tag that is set to the function handleSearchInput. Use console.log() to output the value received in the handleSearchInput function.
Hint: Use event.target.value to get the input value.
Test:
- Given a searchInput
- When I type in the field
- Then the value is logged
- 主要語言
- JavaScript
- 星號
- 1
- 分支
- 28
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CodeYourFuture/React-Module-Project 的其他 Issue
-
♟️ Dependent ticket 🏕 Priority Mandatory 🐇 Size Small 📅 Week 3 📅 Week 4
難度 2/5 1-3 小時 新手友好度 65/100
-
🏕 Priority Mandatory 🐂 Size Medium 📅 Week 4 🧩 Feature
難度 2/5 1-3 小時 新手友好度 65/100
-
🏝️ Priority Stretch 🐂 Size Medium 📅 Week 2 🧩 Feature
難度 2/5 1-3 小時 新手友好度 65/100
-
🏕 Priority Mandatory 🐇 Size Small 📅 Week 2 🧩 Feature
難度 1/5 1 小時以內 新手友好度 68/100
-
♟️ Dependent ticket 🏕 Priority Mandatory 🦔 Size Tiny
難度 2/5 1-3 小時 新手友好度 62/100
查看 CodeYourFuture/React-Module-Project 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
難度 2/5 1-3 小時 新手友好度 76/100
-
難度 2/5 1-3 小時 新手友好度 78/100
Automattic/studio#4908 ·
-
難度 2/5 1-3 小時 新手友好度 74/100
-
難度 2/5 1-3 小時 新手友好度 86/100
sugarlabs/musicblocks#8847 ·