monaco-editor/samples/browser-esm-vite-react
Trey Smith 1aa33634de
Fix possible duplicate of editors in vite sample
In testing the vite sample, I could see duplicate editors created on the screen. From what I can tell, this was due to the if statement checking if editor was null in the `useEffect`. However, the editor variable would not be updated on the first re-render causing a double instance. I adjusted the editor check to be inside the `state dispatch` since it would have the most current information. This seems to have fixed the issue on my end.
2022-11-01 10:29:21 -04:00
..
src Fix possible duplicate of editors in vite sample 2022-11-01 10:29:21 -04:00
.gitignore Rename to /samples/ 2021-11-16 22:01:11 +01:00
index.html Rename to /samples/ 2021-11-16 22:01:11 +01:00
package-lock.json Bump vite from 2.8.6 to 2.9.13 in /samples/browser-esm-vite-react (#3274) 2022-10-04 17:18:06 +02:00
package.json Bump vite from 2.8.6 to 2.9.13 in /samples/browser-esm-vite-react (#3274) 2022-10-04 17:18:06 +02:00
tsconfig.json Rename to /samples/ 2021-11-16 22:01:11 +01:00
vite.config.ts Rename to /samples/ 2021-11-16 22:01:11 +01:00