Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 813 Bytes

README.md

File metadata and controls

20 lines (12 loc) · 813 Bytes

react-random-color-generator

This React app changes the background color of a box on the click of a button. Also, the respective hex code is shown inside of the box. The default background color is white.

Screenshot

To Dos:

  • Use import instead of require to import randomcolor
  • Only declare randomizedColor in the scope where it is needed
  • Use the object shorthand syntax (eg. instead of { name: name }, in newer versions of JavaScript you can write { name } and it will be the same!)
  • Style the box using a class instead of an id

The following library was used:

npm random color

CodeSandbox

Find the project on CodeSandbox