- Create a react application from scratch
- Create a feedback loop that is useful in developing react applications
- Describe how CSS is added to an application
- Explain what JSX is
- Break an application into functional components
- Use
.mapto transform an object to JSX element - Use props to pass information into components
Fork, clone, and install the following repo -> react-functional-components
- Install
create-react-app->npm install -g create-react-app - Use
create-react-appto create a react application ->create-react-app intro-to-react create-react-appwill create a new folder with the the project name you created, also, it will create the following- npm project
- git repository
- What modules does
create-react-appadd to a new react application? - What scripts are added?
- How do you start a react project?
- What is contained the
public/index.htmlfile - What is the entry point of the application? Where does the react application get attached to the DOM?
- What happens when you change something in the 'html' in
src/App.jsfile?- Change some text
- In
src/index.js, how does css get added to the application? - Add a
background-colorto a class inApp.css
- What is JSX used for?
- Given the example given here -> https://babeljs.io/en/repl. Why do you think that JSX is useful?
- Start up the
intro-to-reactapplication - How are classes added to JSX elements? Why is that different from regular HTML?
- How are inline styles added to JSX?
JSX component names must always start with a capital letter. Otherwise, it'll get treated like a regular html element
- Visually break down an application into components
- The chart has been already been broken down into a component
- Where is the
Chartcomponent defined? - How is the
Chartcomponent 'required' intoApp.js - How is the
Chartcomponent exported out of its own file?
- Where is the
- Create Functional components for the following
- Navbar
- Sidebar
- Content
- The data in the table is statically set. Use the following array found here to use data to dynamically render the table
- Copy array to the Content component
- Replace the table body with a javascript expression
- use
.mapto transform the array of objects, to an array of JSX elements
- Create a component named
TableRow, and add the necessary JSX to create a row - In the
Contentcomponents, in the.map, replace the contents of the callback function with the new component that you created - Use JSX props to pass information from the
Contentcomponent to theTableRowcomponent