We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 009f310 commit c05d16eCopy full SHA for c05d16e
apps/react/src/App.js
@@ -7,13 +7,16 @@ import "./App.css";
7
function App() {
8
const containerRef = useRef(null);
9
const [init, setInit] = useState(false);
10
-
11
- useParticlesPlugins(async (engine) => {
+ const { done, error } = useParticlesPlugins(async (engine) => {
12
await loadFull(engine);
13
- }).then(() => {
14
- setInit(true);
15
});
16
+ console.log({ error, done, init });
+
+ if ((!error && !done) || !init) {
17
+ setInit(done);
18
+ }
19
20
const particlesLoaded = useCallback(
21
(container) => {
22
containerRef.current = container;
0 commit comments