Skip to content

[Typo]: Used "return" instead of "continue" in sandbox code #7698

Open
@alrza-msvnj

Description

@alrza-msvnj

Summary

From step 4 till the end of the page, mistakenly used "return" instead of "continue" in ProductTable component that results in not showing any product when the checkbox is checked.

Image

Image

Image

Page

https://react.dev/learn/thinking-in-react#step-4-identify-where-your-state-should-live

Details

In the ProductTable component, we handle filtering products by two if statements, the first one that filters text and the second one that filters checkbox. Consider that a product does not fit into our filters, then one of the if statements triggers and the function get returned. In this scenario the following code would not execute and it leads to ProductTable function not returning any JSX, therefore, there is no product to see in the UI.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions