lukasbach / monaco-editor-auto-typings

Automatically load declaration files while typing in monaco editor instances
https://lukasbach.github.io/monaco-editor-auto-typings/
MIT License
181 stars 39 forks source link

[BUG] Official demo doesn't work for react #31

Open dolanmiu opened 1 year ago

dolanmiu commented 1 year ago

Describe the bug Go to the demo: https://lukasbach.github.io/monaco-editor-auto-typings/

types cannot be found for react

To Reproduce Go to https://lukasbach.github.io/monaco-editor-auto-typings/

guatedude2 commented 1 year ago

The issue is with React 18. I had to use React 17:

autoTypings.setVersions({
  '@types/react': '17.0.2',
});
dolanmiu commented 1 year ago

Worked like a charm! But would still like to see this documented, and the official demo to be fixed