learn-co-curriculum / phase-4-rails-create-read-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
https://learning.flatironschool.com/courses/5287/assignments/173215?module_item_id=377694
Error Your Team Needs To Fix:
TypeError: plants.filter is not a function
PlantPage
src/components/PlantPage.js:24
21 | setPlants(updatedPlantsArray);
22 | }
23 |
> 24 | const displayedPlants = plants.filter((plant) => {
| ^ 25 | return plant.name.toLowerCase().includes(searchTerm.toLowerCase());
26 | });
27 |
No response
No response
Thanks for raising this issue! Future learners thank you for your diligence. In
order to help the curriculum team address the problem, please use this template
to submit your feedback. We'll work on addressing the issue as soon as we can.
Please fill out as much of the information below as you can (it's ok if you
don't fill out every section). The more context we have, the easier it will be
to fix your issue!
Note: you should only raise issues related to the contents of this lesson.
If you have questions about your code or need help troubleshooting, reach out to
an instructor/your peers.
https://learning.flatironschool.com/courses/4207/assignments/135822?module_item_id=281621
Line 24 in the PlantPage component is throwing a TypeError: plants.filter is not a function. Can't see why this would be happening...
Page load
If applicable, attach screenshots to help explain your problem.
https://learning.flatironschool.com/courses/4973/assignments/163914?module_item_id=352630
×
TypeError: plants.filter is not a function
PlantPage
src/components/PlantPage.js:24
21 | setPlants(updatedPlantsArray);
22 | }
23 |
24 | const displayedPlants = plants.filter((plant) => {
| ^ 25 | return plant.name.toLowerCase().includes(searchTerm.toLowerCase());
26 | });
27 |
View compiled
▶ 18 stack frames were collapsed.
(anonymous function)
src/components/PlantPage.js:15
12 | fetch("/plants")
13 | .then((r) => r.json())
14 | .then((plantsArray) => {
15 | setPlants(plantsArray);
| ^ 16 | });
17 | }, []);
18 |
View compiled
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error. Click the 'X' or hit ESC to dismiss this message.
the react part does not start
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.