Skip to content

jmockbee/react-guide-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-guide-2

This was my solution to the challenge below. If you download the code everything works.

I know overwritten not over written :) on the screen shot

  • Create TWO new components: UserInput and UserOutput
  • UserInput should hold an input element, UserOutput two paragraphs
  • Output multiple UserOutput components in the App component (any paragraph texts of your choice)
  • Pass a username (of your choice) to UserOutput via props and display it there
  • Add state to the App component (=> the username) and pass the username to the UserOutput component
  • Add a method to manipulate the state (=> an event-handler method)
  • Pass the event-handler method reference to the UserInput component and bind it to the input-change event
  • Ensure that the new input entered by the user overwrites the old username passed to UserOutput
  • Add two-way-binding to your input (in UserInput) to also display the starting username
  • Add styling of your choice to your components/ elements in the components - both with inline styles and stylesheets
  • About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published