Slow performance, using p5 in react
问题 I am trying to use p5 (https://p5js.org/) in a react application and the performance of some sketches is really bad (same in development as after building the app). I'm using create-react-app for the project scaffold, without any changes to the build setup. The sketches run around 50-60fps when running them directly in the browser, but when loaded into react they drops to about 1-2fps. I am connecting the sketches with react like this: // React Component to interface the sketches class