Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alrza-msvnj opened this issue Mar 29, 2025 · 0 comments · May be fixed by #7719
Open

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

alrza-msvnj opened this issue Mar 29, 2025 · 0 comments · May be fixed by #7719

Comments

@alrza-msvnj
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant