![]() ![]() Now it’s time to support data flowing the other way: the form components deep in the hierarchy need to update the state in FilterableProductTable. So far, we’ve built an app that renders correctly as a function of props and state flowing down the hierarchy. ![]() See the Pen Thinking In React: Step 5 on CodePen. You’ll see that the data table is updated correctly. You can start seeing how your application will behave: set filterText to "ball" and refresh your app. Finally, use these props to filter the rows in ProductTable and set the values of the form fields in SearchBar. Then, pass filterText and inStockOnly to ProductTable and SearchBar as a prop. To FilterableProductTable’s constructor to reflect the initial state of your application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |