diff --git a/src/content/learn/thinking-in-react.md b/src/content/learn/thinking-in-react.md index eec4ae336aa..0f05a0569f6 100644 --- a/src/content/learn/thinking-in-react.md +++ b/src/content/learn/thinking-in-react.md @@ -484,12 +484,26 @@ function FilterableProductTable({ products }) { Inside the `SearchBar`, you will add the `onChange` event handlers and set the parent state from them: -```js {5} - onFilterTextChange(e.target.value)} /> +```js {4,5,13,19} +function SearchBar({ + filterText, + inStockOnly, + onFilterTextChange, + onInStockOnlyChange +}) { + return ( +
+ onFilterTextChange(e.target.value)} + /> +