monaco-react icon indicating copy to clipboard operation
monaco-react copied to clipboard

Warning: Editor: Support for defaultProps will be removed from function components

Open evanfrawley opened this issue 3 years ago • 8 comments

Hi there!

Describe the bug

I am getting a warning using Monaco Editor:

Warning: Editor: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
    at Editor (webpack-internal:///(sc_client)/./node_modules/@monaco-editor/react/lib/cjs/Editor/Editor.js:23:3)
    at div

To Reproduce

Steps to reproduce the behavior:

  1. Use the latest React & NextJS versions
  2. Use the latest version of this package
  3. Observe that React is providing the warning for defaultProps

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version: Version 108.0.5359.124 (Official Build) (x86_64)

Additional context Add any other context about the problem here.

evanfrawley avatar Dec 21 '22 20:12 evanfrawley

@evanfrawley thanks for this report 🙌 I'll fix this in the next version

suren-atoyan avatar Dec 22 '22 07:12 suren-atoyan

Awesome! Thank you for taking a look, and quadruple thank you for the awesome library!

evanfrawley avatar Dec 22 '22 07:12 evanfrawley

@evanfrawley thanks for this report 🙌 I'll fix this in the next version

when the next version publish

netSharks avatar Dec 27 '22 06:12 netSharks

Got the same error in Next.js 13

SohelKabir avatar Jan 29 '23 14:01 SohelKabir

Still having the same issue here!!

genaroibc avatar Mar 28 '23 21:03 genaroibc

Going to merge and release this PR; it will solve this issue

suren-atoyan avatar Mar 29 '23 05:03 suren-atoyan

@GenaroIBC @SohelKabir @netSharks @evanfrawley may I ask you to check version 4.5.0-beta.0? It's fully rewritten with TypeScript 🔥 Thanks to @juliusmarminge 🙌

I released a beta version and would like to test it first, so I would appreciate it if you could find some time and test the beta version in your projects. Thanks 💚

suren-atoyan avatar Apr 02 '23 18:04 suren-atoyan

@suren-atoyan I tested it and had no problems or warnings 🎉

genaroibc avatar Apr 02 '23 20:04 genaroibc

This issue has been marked as stale due to inactivity. It will be closed in 7 days unless further activity occurs.

github-actions[bot] avatar Apr 11 '25 00:04 github-actions[bot]

Closing due to inactivity. Feel free to reopen if needed.

github-actions[bot] avatar Apr 19 '25 00:04 github-actions[bot]