Giter VIP home page Giter VIP logo

phase-4-rails-create-read-lab's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phase-4-rails-create-read-lab's Issues

Fix Error Upon Starting Frontend

Canvas Link

https://learning.flatironschool.com/courses/5287/assignments/173215?module_item_id=377694

Concern

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 | 

Additional Context

No response

Suggested Changes

No response

TypeError not a funtion from React

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.


Link to Canvas

https://learning.flatironschool.com/courses/4207/assignments/135822?module_item_id=281621

Describe the bug

Line 24 in the PlantPage component is throwing a TypeError: plants.filter is not a function. Can't see why this would be happening...

What is the expected behavior?

Page load

Screenshots

If applicable, attach screenshots to help explain your problem.

What OS are you using?

  • OS X

Any additional context?

Add any other context about the problem here.
Screen Shot 2021-08-11 at 4 54 08 PM

Lab does not work

Canvas Link

https://learning.flatironschool.com/courses/4973/assignments/163914?module_item_id=352630

Concern

×
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.

Additional Context

the react part does not start

Suggested Changes

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.