Check out example codes for "react color picker". It will help you in understanding the concepts better.

Code Example 1

//Installation
npm install react-color --save

//Usage
import React from 'react'
import { SketchPicker } from 'react-color'
 
class Component extends React.Component {
 
  render() {
    return <SketchPicker />
  }
}

Learn ReactJs, React Native from akashmittal.com