Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Okay I am trying to create a project/code using ReactJS. I have tried to install on my command prompt. Please show me how to install

Okay I am trying to create a project/code using ReactJS. I have tried to install on my command prompt. Please show me how to install and code on here.

This is what I want to use/do:

image text in transcribed

image text in transcribed

The code:

UserInput.js

import React from 'react'; const userInput = (props) => { const inputStyle = { border: '2px solid red' }; return ; }; export default userInput; 

UserOutput.js

import React from 'react'; import './UserOutput.css'; const userOutput = (props) => { return ( 

Username: {props.userName}

I hope I'll be overwritten!

); }; export default userOutput;

App.js

import React, { Component } from 'react'; import './App.css'; import UserInput from './UserInput/UserInput'; import UserOutput from './UserOutput/UserOutput'; class App extends Component { state = { username: 'supermax' } usernameChangedHandler = (event) => { this.setState({username: event.target.value}); } render() { return ( 
  1. Create TWO new components: UserInput and UserOutput
  2. UserInput should hold an input element, UserOutput two paragraphs
  3. Output multiple UserOutput components in the App component (any paragraph texts of your choice)
  4. Pass a username (of your choice) to UserOutput via props and display it there
  5. Add state to the App component (=> the username) and pass the username to the UserOutput component
  6. Add a method to manipulate the state (=> an event-handler method)
  7. Pass the event-handler method reference to the UserInput component and bind it to the input-change event
  8. Ensure that the new input entered by the user overwrites the old username passed to UserOutput
  9. Add two-way-binding to your input (in UserInput) to also display the starting username
  10. Add styling of your choice to your components/ elements in the components - both with inline styles and stylesheets
); } } export default App;

UserOutput.css

UserOutput { width: 60%; padding: 16px; margin: 16px; border: 2px solid black; background-color: #ccc; text-align: center; }

kis src UserInput JS UserInput.js UserOutput 3 UserOutput.css UserOutput.js JS supermax|IIII Username: supermax|||||| I hope I'll be overwritten! Username: supermaxIIIII I hope I'll be overwritten! Username: Max I hope I'll be overwritten! ere to search SAMSUNG F3 F

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

KEY QUESTION Refer to columns 1 and 6 in the table for question

Answered: 1 week ago