Coder Social home page Coder Social logo

Comments (7)

aleclarson avatar aleclarson commented on June 16, 2024

Please try with the latest canary. 👍

from react-spring-examples.

evastr avatar evastr commented on June 16, 2024

Unfortunately it does not work with "[email protected]" either. The animation of the color works, but the path is not animated.

from react-spring-examples.

aleclarson avatar aleclarson commented on June 16, 2024

If you put the code into a sandbox, I'll look into it. 👍

from react-spring-examples.

evastr avatar evastr commented on June 16, 2024

Please find the code here: https://codesandbox.io/s/misty-sun-75d0m?fontsize=14&hidenavigation=1&theme=dark
Many thanks for your help.

from react-spring-examples.

aleclarson avatar aleclarson commented on June 16, 2024

You were resetting the xy domain and y range during render, which is a no-no.

+  const xScale = scaleLinear().range(xRange);
   const yScale = scaleSqrt();
-
-  // Map input domain to output range
-  // xScale.domain(xDomain).range(xRange);
-  // yScale.domain(yDomain).range(yRange);

from react-spring-examples.

evastr avatar evastr commented on June 16, 2024

Still not working as expected - please send a link to a codesandbox that works.

from react-spring-examples.

aleclarson avatar aleclarson commented on June 16, 2024

You're right, my solution isn't complete. You'll want to ensure all state is cached with useState or you won't get the expected result. Specifically, these values need to be reused between renders:

https://github.com/react-spring/react-spring-examples/blob/bb119ece9675498108f2472e23235fdcd641f73b/demos/renderprops/sunburst/index.js#L39-L45

This isn't an issue with react-spring, so I can't help you further.

from react-spring-examples.

Related Issues (17)

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.