Skip to content

Commit d15e5ca

Browse files
committed
build: fixed some useEffect dependencies
1 parent 6f0231e commit d15e5ca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

apps/react/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function App() {
1414
initParticlesEngine(initParticlesCb).then(() => {
1515
setInit(true);
1616
});
17-
}, []);
17+
}, [ initParticlesCb ]);
1818

1919
const particlesLoaded = useCallback(
2020
(container) => {

components/react/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const App = () => {
7070
initParticlesEngine(initParticlesCb).then(() => {
7171
setInit(true);
7272
});
73-
}, []);
73+
}, [initParticlesCb]);
7474

7575
const particlesLoaded = useCallback(async (container) => {
7676
await console.log(container);
@@ -176,7 +176,7 @@ const App = () => {
176176
initParticlesEngine(initParticlesCb).then(() => {
177177
setInit(true);
178178
});
179-
}, []);
179+
}, [initParticlesCb]);
180180

181181
const particlesLoaded = useCallback(async (container: Container) => {
182182
await console.log(container);
@@ -283,7 +283,7 @@ const App = () => {
283283
initParticlesEngine(initParticlesCb).then(() => {
284284
setInit(true);
285285
});
286-
}, []);
286+
}, [initParticlesCb]);
287287

288288
const particlesLoaded = useCallback(async (container) => {
289289
await console.log(container);
@@ -317,7 +317,7 @@ const App = () => {
317317
initParticlesEngine(initParticlesCb).then(() => {
318318
setInit(true);
319319
});
320-
}, []);
320+
}, [initParticlesCb]);
321321

322322
const particlesLoaded = useCallback(async (container: Container) => {
323323
await console.log(container);

0 commit comments

Comments
 (0)