Skip to content

adamr1348/react-review-workshop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-review

HRLA28-react-review

Start Server

npm install
npm run build
npm start

Exercise-1 Rendering React to DOM

Render "Hello from React" to the div in index.html with an id of "app".

Exercise-2 Creating a Functional Component in React

Create folder called Components within the client folder. Inside of components folder, create a file called App.jsx and build out a functional react component in that file that renders "Hello from Component" onto the DOM.

Exercise-3 Passing Props into A Funcitonal Component

Pass your first and last name down as props to your component from index.jsx

Exercise-4 Refactoring a Functional Component to a Stateful Component

Refactor your functional component into a stateful class component.

Exercise-5 Using Inputs to Update State

Inside of your class component, create an input field. Build out some functionality that will allow you to set your first name to the state object.

Exercise-6 Dealing with Multiple Inputs

Repeat the process to your last name.

Exercise-7 Add Another Component

Inside your components folder, create another file called List.jsx. Build out another stateful component. Add an string and an array object in state. Create another input field. Build out functionality that will allow you to add text to the string element in state. Build out functionality that will allow you to add the string stored in state to the array stored in state. Then add three elements to the array.

Exercise-8 Mapping Elements

Create another functional component called ListEntry.jsx in your components folder. Develop some functionality that will render the elements stored in the array in List.jsx to the page.

Exercise-9 Adding Click Events

Add functionality such that when an element in that list is clicked, we are notified in the List.jsx component.

Exercise-10 Conditional Rendering

Go back to App.jsx and develop some functionality that will only display List.jsx if the first and last name entered there match your own.

Final Todo List Refactor

Refactor the code you have made into a Todo List app. This app should have all CRUD functionality. ie. Should be able to create todos, should be able to see todos, should be able to update todos, should be able to delete todos.

About

React review for HRLA 28

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.3%
  • HTML 24.7%