How to use the react-konva.useStrictMode function in react-konva

To help you get started, we’ve selected a few react-konva examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ejarzo / Shape-Your-Music / src / components / Shape / ShapeVertex.jsx View on Github external
import React, { Component } from 'react';
import Color from 'color';
import { useStrictMode, Circle } from 'react-konva';
useStrictMode(true);
/*
  The shape's vertecies. Can be dragged to edit the shape.
*/
class ShapeVertex extends Component {
  constructor(props) {
    super(props);

    const luminosity = Color(props.color).luminosity();
    this.lightenAmount = 1.8 * (1 - luminosity);

    this.defaultRadius = 4;
    this.hoverRadius = 6;
    this.strokeWidth = 2;

    this.state = {
      radius: this.defaultRadius,

react-konva

React binding to canvas element via Konva framework

MIT
Latest version published 1 year ago

Package Health Score

71 / 100
Full package analysis

Popular react-konva functions