Skip to content

Commit e5f9130

Browse files
authored
minor update to wording for thinking-in-react.md (#3814)
1 parent 4a0b0ec commit e5f9130

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/thinking-in-react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ So far, we've built an app that renders correctly as a function of props and sta
137137

138138
React makes this data flow explicit to help you understand how your program works, but it does require a little more typing than traditional two-way data binding.
139139

140-
If you try to type or check the box in the current version of the example, you'll see that React ignores your input. This is intentional, as we've set the `value` prop of the `input` to always be equal to the `state` passed in from `FilterableProductTable`.
140+
If you try to type or check the box in the previous version of the example (step 4), you'll see that React ignores your input. This is intentional, as we've set the `value` prop of the `input` to always be equal to the `state` passed in from `FilterableProductTable`.
141141

142142
Let's think about what we want to happen. We want to make sure that whenever the user changes the form, we update the state to reflect the user input. Since components should only update their own state, `FilterableProductTable` will pass callbacks to `SearchBar` that will fire whenever the state should be updated. We can use the `onChange` event on the inputs to be notified of it. The callbacks passed by `FilterableProductTable` will call `setState()`, and the app will be updated.
143143

0 commit comments

Comments
 (0)