Git Product home page Git Product logo

u2_hw_react_quiz's Introduction

React README Quiz!

react

Instructions

1. How do you create a React App from the terminal command line?

npx create-react-app my-app 

2. If you clone a React App that has already been created, what command is needed to start developing with its dependencies?

npm install 

3. How do you start the in-browser development server for a React App?

enter into the file in the terminal and then 
npm start

4. What folder in a React App should component files be created in?

src file 

5. What is the syntax for a function based component?

function Name() {
logic/variables

return <div></div>
}
export default Name

6. What direction are props passed in a React Component?

uni-directional flow

7. How is a React Component accessed in another file?

at the end of your component make sure export.
export default ComponentName 

then on your new file import it 
import ComponentName from './components/ComponentName' 

8. How do we gain access to props in a child component?

You must set the parameter of your component function to props
function ComponentName(props) {}

now you can call the prop from the app.js in your component function. at the return tag enter in {props.name}
ex. 
function ComponentName (props) {

return <div>{props.name}</div>
}

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.