I made a color picker with React and Canvas. Currently the components are rendered in React and canvas is done with vanilla javascript. I\'d like to two to mesh more, so I w
In accordance to React16 You can use React.createRef()
React.createRef()
class ColorPicker extends React.Component { constructor(props) { super(props); this.colorPickerRef = React.createRef(); } componentDidMount() { this.context = this.colorPickerRef.current.getContext('2d'); } render() { return ( ) } }