Skip to content

Update Thinking in React example to filter products in FilterableProductTable component #10808

Closed
@danielsbird

Description

@danielsbird

In step 4 of the Thinking in React example, the ProductTable component filters and displays an array of products based on user input.

I am unsure why the code for filtering the products is in the ProductTable component and not the FilterableProductTable component. The same question was previously raised in issue #8035.

I think having FilterableProductTable be responsible for filtering the products would improve the example for two reasons:

  • Allow ProductTable to be used outside of FilterableProductTable
  • Better separate the concerns of filtering the products from displaying the products

I updated the example and I'm happy to submit a PR if this is something that should be changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions