Skip to content

Error: error while updating property 'startpoint' of a view managed by bvlineargradient. Null #578

@iLightFPS

Description

@iLightFPS

I'm trying to make a linear gradient generator but keep getting this error when using the slider to change the values from 0-1

const [startX, setStartX] = useState(0);
const [startY, setStartY] = useState(0);

<LinearGradient
  start={{x: startX, y: startY}}
  end={{x: 0.5, y: 1.3}}
  locations={[0.4, 0.9]}
  colors={[colorOne, colorTwo]}
  style={{
    height: 200,
    width: '100%',
    borderRadius: 10,
}}></LinearGradient>

<Slider
  thumbTintColor="#fff"
  minimumValue={0}
  maximumValue={1}
  step={0.1}
  value={startX}
  onValueChange={val => setStartX(val)}
 />

Edit: spelling

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions