Giter Site home page Giter Site logo

animal_farm's Introduction

React Animal Farm

Use this app as a template for your deliverable!

Learning Objectives

  • Use className attribute to set styles versus style = {{ background: 'magenta' }}
  • Display images in a React app
  • Use attributes in parent components to pass data down to child components as props
  • Use {} as "portals" in the render method to do JavaScript inside our HTML
  • Use .map to iterate over an array and render new elements for each item in an array
  • Use jsx to produce & render a React component
  • Use Netlify to deploy a React app

Description

Welcome to the Alchemy Farm! For this deliverable, you will practice creating functional components, mapping through lists and rendering a component for each item.

There is a list of animals provided for you in data.js, as well as an empty <Main /> component and an empty <Animal /> component. You need to add the code to display the animals by mapping through the list provided and rendering an <Animal /> component for each animal. The final product should look like this:

Acceptance Criteria

  • <Main /> should import background.png and set it as a background image on the <main> element
  • <Main /> component should use a .map to loop through and render an <Animal /> component for each animal listed in data.js
  • Animals should be positioned dynamically using the style attribute in JSX and props
  • should utlize the existing classes in Animal.css
  • App should be deployed on Netlify

Rubric

Task Points
Main branch deployed to Netlify 0.5
Open PR from dev branch with Netlify deploy preview 0.5
Uses a .map to render <Animal /> component for each animal in data.js 3
Properly passes props to <Animal /> 3
Dynamically sets the style attribute in JSX to position the animals 2
Utilizes existing classes to properly display animals 1

Stretch Idea

  • Find some audio sounds of farm animals and research how to add click handlers to elements in React - play the sound on click

Image Attribution

Background Image by OpenClipart-Vectors from Pixabay

animal_farm's People

Contributors

rioredwards avatar

Stargazers

Roman avatar

Watchers

 avatar

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.