Git Product home page Git Product logo

Comments (5)

ashiishme avatar ashiishme commented on May 28, 2024

@marcelgruber Thank you for flagging this issue. Can you please share the error as well? It will help me to debug easily.

Also, please include an information about how to regenerate the issue.

from react-sine-wave.

marcelgruber avatar marcelgruber commented on May 28, 2024

@ashiishme

Here is the error:

Screen Shot 2021-07-21 at 4 31 50 PM

The error shows up when I resize the window.

from react-sine-wave.

ashiishme avatar ashiishme commented on May 28, 2024

@marcelgruber I tried to regenerate the issue but it is still working in my case.

Are you trying to implemented the wave on your project? There are no state used on this wave project.

from react-sine-wave.

marcelgruber avatar marcelgruber commented on May 28, 2024

@ashiishme yes, implementing in my project.

State is used here: https://github.com/ashiishme/react-sine-wave/blob/main/src/app/components/canvas/canvas.tsx

from react-sine-wave.

ashiishme avatar ashiishme commented on May 28, 2024

@marcelgruber The error has to do something with your implementation. You can add a conditional flag and toggle it using clean up function inside useEffect. Something like this:

useEffect(() => {
  let myFlag = true;
  if (myFlag) setState({...}); // you state thing here
  return () => { myFlag = false }; // toggle flag on clean up function so that when unmounted occurs the state doesn't try to change / update that results in the memory leak error.
}, []);

from react-sine-wave.

Related Issues (4)

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.