Comments (5)
@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.
Here is the error:
The error shows up when I resize the window.
from react-sine-wave.
@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.
@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.
@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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-sine-wave.