Skip to content

SpringValue<number[]> is not assignable to Vector3 #1302

@Aslemammad

Description

@Aslemammad

🐛 Bug Report

I was playing with r3f and react-spring and had a little problem (which can be solved with the as keyword)

  const props = useSpring({
    scale: active ? [1.5, 1.5, 1.5] : [1, 1, 1],
    color: hovered ? 'hotpink' : 'gray',
  });
  // in the return
  <mesh // or animated.mesh
      scale={props.scale} // here's the type error
  >
  // it says: Type 'SpringValue<number[]>' is not assignable to type 'Vector3'.

If you can guide me some about the source code, I think I may solve it and send a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions