Code Monkey home page Code Monkey logo

Comments (2)

wcandillon avatar wcandillon commented on June 6, 2024

Thank you for reporting this.
The examples in the documentation are compiled with typescript.
And we also have tests for this: https://github.com/Shopify/react-native-skia/blob/main/package/src/renderer/__tests__/e2e/Rect.spec.tsx#L61
If you think that there is a particular scenario that would enable us to trigger this potential bug, we will add it/fix it immediately.

from react-native-skia.

ava-m-c avatar ava-m-c commented on June 6, 2024

I encountered the same issue. I tried to use it like this

const barPath = Skia.Path.Make();
barPath.addRRect({
  rect: { x, y, width, height },
  topLeft: { x: r, y: r },
  topRight: { x: r, y: r },
  bottomLeft: { x: 0, y: 0 },
  bottomRight: { x: 0, y: 0 },
});

I followed the described format from the documentation and the allowed type as I find it in the TS code. However, I still get a runtime error saying 'Exception in HostFunction: Value is undefined, expected a number'. I get a runtime error for both the Path.Make method and using the RoundedRect component directly. So, it seems to me something might go wrong somewhere behind the scenes in the source code when handling the bottom/topLeft/Right props.

from react-native-skia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.